December 12th, 2003, 04:48 AM
basic Query help
I am doing some coursework and need to complete some queries.
I'm sure even the best of the best can't quite make queries without knowing the tables so I have:
site_boundaries:site_name*,boundary1, boundary2, boundary3, boundary4
recorder_details:recorder_id,(more fields like recorder_name, recorder_addres, etc )
species_details:species_id, (more fields like name, etc)
The queries I have to complete are:
a. A list of Species (no duplicates).
b. A list of records for a site after a specific date.
c. The number of species found at each site.
d. Sites and dates where a particular species was recorded by a specific surveyor.
e. List of species that have less than a given number of records within some mapping area (site).
I have done the 1st one and the 2nd I'm not sure why it isn't working.
For the 2nd query I have:
ORDER BY site_record_date
Any help will be much appreciated, I will be working on these all day so I will keep everyone posted as to my progess.
December 12th, 2003, 04:58 AM
Ok, compelted query 3.
SELECT site_name, COUNT(*)
GROUP BY site_name
December 12th, 2003, 05:38 AM
Ok, completed 1,2 and 3.
The only thing wrong with it was I hadn't put single quotes around the date ..
oh well nevermind
still doing 4 and 5