Question

Write an SQL query A related table to snp151 is named snp151CodingDbSnp, which stores data about ...

write an SQL query

A related table to snp151 is named snp151CodingDbSnp, which stores data about changes in protein sequence related to SNPs. For this query, you will extract data from both tables using a join. The query results should have the SNP name, chromosome, strand and start position from the snp151 table, AND the transcript, codons & peptides from the snp151CodingDbSnp table. Q2: Modify Q1 to only include SNPs that are in frame 2. Q3: Modify Q2 to only include SNPs that involve a change to or from a methionine (M). Q4: Modify Q3 by joining another table, snp151OrthoPt5Pa2Rm8, which has data for orthologous alleles in chimp, orangutan and rhesus macaque. To clarify, there will be a total of three tables joined. From this third table add the fields for the chimp chromosome and chimp start coordinate. Q5: Modify Q4 to select SNPs where the chimp ortholog is unknown. To do this, check if the chimp chromosome has a value of “?”.  

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Sol:

1.

select A.SNP name, A.chromosome, A.strand, A.start position, B.transcript, B.codons, B.peptides from

snp151 A INNER JOIN snp151CodingDbSnp B on

A.SNP name=B.SNP name

2.

select A.SNP name, A.chromosome, A.strand, A.start position, B.transcript, B.codons, B.peptides from

snp151 A INNER JOIN snp151CodingDbSnp B on

A.SNP name=B.SNP name and A.frame='2'

3.

select A.SNP name, A.chromosome, A.strand, A.start position, B.transcript, B.codons, B.peptides from

snp151 A INNER JOIN snp151CodingDbSnp B on

A.SNP name=B.SNP name and A.frame='2' and (a.codon='AUG' OR b.codon='AUG')

4.

select A.SNP name, A.chromosome, A.strand, A.start position, B.transcript, B.codons, B.peptides, C.chimp_chromosome, C.chimp_start_coordinate from

snp151 A INNER JOIN snp151CodingDbSnp B on

A.SNP name=B.SNP name and A.frame='2' and (a.codon='AUG' OR b.codon='AUG')

INNER JOIN snp151OrthoPt5Pa2Rm8 C on

B.chromosome=C.chimp_chromosome

NOTE: Make sure that the original columns have the same names as mentioned in this query, cause I have assumed names as mentioned in the problem statement.

Add a comment
Know the answer?
Add Answer to:
Write an SQL query A related table to snp151 is named snp151CodingDbSnp, which stores data about ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT