Yayator
Messages postés2Date d'inscriptiondimanche 14 décembre 2008StatutMembreDernière intervention14 décembre 2008
-
14 déc. 2008 à 21:36
Yayator
Messages postés2Date d'inscriptiondimanche 14 décembre 2008StatutMembreDernière intervention14 décembre 2008
-
14 déc. 2008 à 22:26
Bonjour,
J'ai quelque requêtes à faire et je dois dire que j'ai un peu du
mal. (en plus le sujet est en anglais, si quelqu'un pouvait me donner
un petit coup de pouce. Il faut absolument que je réussisse avant minuit....
Database Schema
TABLE PROJECT
PROJECTID CHARACTER(10) (Primary Key)
PROJECT_NAME CHARACTER(40)
TABLE COMPOUND
COMPID CHARACTER(15) (Primary Key)
STRUCTURE BLOB
TABLE REACTION
REACTIONID INTEGER (Primary Key)
COMPID CHARACTER(15)
BATCHNO CHARACTER(35)(Unique Key)
PROJECTID CHARACTER(10)
LIBRARYNAME CHARACTER(35)
TABLE BIOLOGICAL_DATA
COMPID CHARACTER(15)
BATCHNO CHARACTER(35)
TESTID NUMBER
PROJECTID CHARACTER(10)
NUM_VALUE NUMBER
ANALYTICALID INTEGER
REACTIONID INTEGER
BIODATAID INTEGER (Primary Key)
TABLE SAMPLE_DATA
ANALYTICALID INTEGER (Primary Key)
REACTIONID INTEGER
PROJECTID CHARACTER(10)
BARCODE CHARACTER(35)
CONTAINERID CHARACTER(35)
WELL NUMBER
QUANTITY NUMBER
UNIT CHARACTER(10)
PURITY NUMBER
Questions:
1.)Write the SQL statement that provides a list of all projects (PROJECTID) and the total number of batches for each.
2.)Write the SQL statement that provides a list of all projects (PROJECTID) and the total number of biological results for each.
3.)Write the SQL statement that provides a list of all the
compounds (COMPID) and the total number of batches and samples for
each.
4.)Write the SQL statement that provides a list of all the batches
(BATCHNO) that has an average purity > 50 for samples with a
quantity > 10.
5.)Write the SQL statement that provides a list of all the batches (BATCHNO) with no biological data.
<ol start="4">
<li>
Write the SQL statement that
provides a list of all the batches (BATCHNO) that has an average
purity > 50 for samples with a quantity > 10.
</li>
</ol>
SELECT BATCHNO
FROM BIOLOGICAL_DATA D, SAMPLE_DATA S
WHERE B. ANALYTICALID = S.
ANALYTICALID
AND S.PURITY > 50
AND S.QUANTITY > 10.
<ol start="5">
<li>
Write the SQL statement that
provides a list of all the batches (BATCHNO) with no biological
data.