I knew the basic of indexes, views and joins, so I could answer those questions. Improving efficiency of query was difficult question to answer - I just said make indexes, read the query and try to reduce hits on table. I had no idea how to write SQL programmes.
select * from MyTable groupby (the interviewer said it requires a where, but he was wrong)
can be done with or with out Group by
you could have said this in an assertive manner. I have seen interviewers who test confidence this way. I have also seen interviewers who asked me to repeat/explain a answer number of times...this is testing your patience. All tricky...they want to see behavior and confidence.
Design a database for a vendor (including products, purchase orders, etc.) and then write a query to select the names of all products that need to be shipped today. (I can't remember the exact question, but it was something along these lines.)
Determine the relationships between objects (and what fields each object should and must contain), draw an E.R. diagram, and then write a query of medium-level difficulty (involving at least a join, possibly also an aggregate function) on this database.