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
 preparing for SQL midterm test - last question

Author  Topic 

gizmo2
Starting Member

1 Post

Posted - 2008-02-08 : 11:26:31
Hi.
I'm new to SQL and trying to solve this question (I have solved many others, but having problems with this particular one) :
there are 3 tables describing voters in america
Ballot_box(ballot_box_num,SettelmentID,Street,HouseNum)
Settelemnt(SettelmentID,Settelment_name)
Voter(ID,voter_name,Adrress,Birth_date,ballot_box_num)

The question is :
Write a SQL query that show the names and codes for all settelments that have less than 100 voters.

Please help !!!!!

jdaman
Constraint Violating Yak Guru

354 Posts

Posted - 2008-02-08 : 11:38:00
Lets break it up into smaller parts and take them one at a time. Based on the first part of the question "Write a SQL query that show the names and codes for all settlements..." you know that you need "names and codes for all settelments". So step 1 would be to write a select statement that would give you the names and codes for each settlement.

Try writing step 1 and post what you come up with and then we can build from there.
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-02-08 : 11:41:24
Moe: This thing can flash-fry a buffalo in 10 seconds!
Homer: 10 seconds?!? But I'm hungry now.

Be One with the Optimizer
TG
Go to Top of Page

jdaman
Constraint Violating Yak Guru

354 Posts

Posted - 2008-02-08 : 13:00:25
Perhaps I should have read "preparing for SQL midterm test" as "taking SQL midterm test".
Go to Top of Page
   

- Advertisement -