Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7939811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:12:59+00:00 2026-06-03T23:12:59+00:00

I have a mysql table with the following columns SNP Probe Genotype_00 Mean_00 Std_00

  • 0

I have a mysql table with the following columns

SNP
Probe
Genotype_00
Mean_00
Std_00
Genotype_01
Mean_01
Std_01
Genotype_11
Mean_11
Std_11

I would like the table to have the following columns:

SNP
Probe
Genotype
Mean 
Std

where for each pair (SNP,Probe) I have three rows, one corresponding to each genotype.

For example the row

rs1 probe1 AA 5.6 0.3 AG 4.3 0.2 GG 3.4 0.1

should be transformed into

rs1 probe1 AA 5.6 0.3
rs1 probe1 AG 4.3 0.2
rs1 probe1 GG 3.4 0.1

Can anyone help me finding a way to do this?
Thanks a lot in advance, any suggestion will be greatly appreciated

Rossella

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:13:00+00:00Added an answer on June 3, 2026 at 11:13 pm

    Create Table with follow columns.

    SNP
    Probe
    Genotype
    Mean 
    Std
    

    Then execute these SQL statements one by one

    INSERT INTO new_table
    SELECT SNP, Probe, Genotype_00, Mean_00, Std_00
    FROM old_table
    
    INSERT INTO new_table
    SELECT SNP, Probe, Genotype_01, Mean_00, Std_01
    FROM old_table
    
    
    INSERT INTO new_table
    SELECT SNP, Probe, Genotype_11, Mean_00, Std_11
    FROM old_table
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three mysql table from same database Db1. Three tables have following columns.
I have a MySQL table with the following columns: id(int), date (timestamp), starttime(varchar), endtime(varchar),
I have one MySQL table, users , with the following columns: user_id (PK) email
I have created a mysql table with the following columns... item_price, discount, delivery_charge, grand_total
I have a (mysql) database table with the following columns: NAME | String (Unique)
Hello I have following columns in mysql table: rating1, rating2, price, cond, approved Is
I have an table in my MySql database that has the following columns: -
I have a mysql table with the following columns: id (autoincremented primary key) user_id
I have a mysql table called jos_users_quizzes with the following columns: id quiz_i duser_id
I have a mysql table with the following columns: group_id game_id user_id message last_update

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.