我有下表:
sample_name gene_name expression_value
Father 1 A1BG 1.53462
Q83X 1 A1BG 1.29403
Rescue 1 A1BG 1.81678
Father 2 A1BG 1.56481
Q83X 2 A1BG 0.924723
Rescue 2 A1BG 1.70408
Father 1 A1BG-AS1 1.96224
O83X 1 A1BG-AS1 1.92807
Rescue 1 A1BG-AS1 2.0421
Father 2 A1BG-AS1 1.61606
我想编写一个select查询,生成以下输出:
Gene Father_1 Father_2 Q83X_1 Q83X_2 Rescue_1 Rescue_2
A1BG 1.53462 1.56481 1.29403 0.924723 1.81678 1.70408
A1BG-AS1 ...... ..... ..... ......... ....... ........
我怎样才能达到这个目标?
谢谢!
1条答案
按热度按时间sxpgvts31#
您可以使用以下方法在mysql中执行透视: