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.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-11-05 : 08:30:41
|
geetha writes "Consider the relational schema of the pubs database: Authors(au_di,au_lname,au_fname,phone,address,city,state,zip,contact) Titleauthor(au_id,title_id,au_ord,royaltyper) Titles(title_id,title,type,pub_id,price,advance,royalty,ytd_sales,notes, pubdate) Publishers(pub_id,pub_name,city,stare,country) Employee(emp_id,fname,minit,lname,job_id,job_lvl,pub_id,hire_date) Write a SQL statements to perform the following Queries:1.List the name of all authors who live in Oakland (7 marks)2.What is the total year-to-date sales(ytd_sales) for all titles published?(7 marks)3.How many publishers live in each country? The result should state the country and the number of publishers in that country?( 8 marks) 4LIst the name of all employees who work for "Five Lakes Publishing" (8marks)" |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-11-05 : 09:02:37
|
Is this a job interview or a test question?Good luck either way.- Jeff |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-11-05 : 09:02:55
|
I love the smell of homework in the morning.For a full 30 marks, learn to not suck at life.Damian |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2004-11-05 : 10:12:31
|
quote: au_di
Even Google knows that's a typo! |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-11-05 : 10:28:37
|
quote: 4LIst the name of all employees who work for "Five Lakes Publishing" (8marks)"
UPDATE eSET fname = 'Outsourced', minit = '2', lname = 'India'FROMemployee e INNER JOIN publishers p ON p.pub_id = e.pub_idWHERE pub_name = 'Five Lakes Publishing'Damian |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-11-05 : 10:45:57
|
LOL, that's excellent Damian !!!- Jeff |
|
|
|
|
|
|
|