Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help to resolve this script, please!

Author  Topic 

ttours_osorio
Starting Member

2 Posts

Posted - 2010-08-24 : 18:28:10
Please, can anyone help me to resolve those excercises.

This is the link http://sqlzoo.net/2b.htm

I need the answer or explanation on how to resolve the questions: 2b, 3a and 3b.

Many thanks for the inputs!

sandra

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-08-24 : 20:20:08
2b - use the min function on the yr
3a - vague question -- either just group by subject, winner or count(distinct winner)
3b - vague question -- either just group by subject, yr or count (distinct yr)

Hope this helps!

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

ttours_osorio
Starting Member

2 Posts

Posted - 2010-08-24 : 20:54:22
Hey Jim,
Many thanks for the reply.
Got the answer right for the 2b - { SELECT subject, MIN(yr)FROM nobel GROUP BY subject }
3a - tried to group with yr, subject, and winner...it is not coming up though. Error message in my sitax appeared.
3b - Did not get it too. I think that is because I haven't done any excersice with the DISTINCT thing.
Thanks so much for your help :)

Sandra

sandra
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-25 : 09:28:20
quote:
Originally posted by ttours_osorio

Hey Jim,
Many thanks for the reply.
Got the answer right for the 2b - { SELECT subject, MIN(yr)FROM nobel GROUP BY subject }
3a - tried to group with yr, subject, and winner...it is not coming up though. Error message in my sitax appeared.
3b - Did not get it too. I think that is because I haven't done any excersice with the DISTINCT thing.
Thanks so much for your help :)

Sandra

sandra


post the queries you used. we should be able to help!

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -