Thanks, no its not a school project (Yes I did read the Posting Policies!)
Im just creating a database for a friend who tends to misplace some of his DVDs cuz he cant keep track of them.
In regards to the MAX, I just used the Age because I couldnt be botheredn writing the other table which has...
Ok, sorry, different timezones means a delayed response. I have 3 tables, well 4 but ones not needed:
borrower(id, first_name, surname, age)
DVD(id, title, rating, limit)
DVDloan(first_name, surname, rating)
(by the way its my own little DVD library system)
What I need to list is:
id...
Yep that worked! However when I wanted to add fields from another table, I get "You tried to execute a query that does not include the specified expression.. as part of an aggregate function"
Ive made heaps of large databases and the SQL works fine with aggregates and multiple tables, but never...
Is it possible to get the maximim value (for example an age) for every different value (eg surname) in another field of the record??
For example the oldest person for every surname present in a surname column?
I've tried subqueries, distinct, etc and I cant get it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.