x

[Closed] Please help with the following queries. Rectify if they are wrong.

Refer this link for the questions>>

My answers till now,(by the way I solved them but I am not sure if they are correct, so I wanted to get something like a model answer paper to compare and check.)

Answer.2) select name from Artist A where exists(select name from album B where A.name=B.name)

Answer.3)select A.name from Atist A, Track T, TrackList L where A.artistID=L.trackID and L.Tracknum=1 and T.name="Intro"

Answer.4)select artist.name from Artist where artist.name="Mogwai" and weight>(select weight from Artist,SimilarArtist where Artist.artistID=SimilarArtist.artistID)

Answer.5)select A.name from Album A,Tracklist L where L.tracknum>30 and L.albumID=A.albumID

M not getting the other answers. So if nething wrong in the above pls rectify.

more ▼

asked Aug 10, 2010 at 08:14 AM in Default

avatar image

zashwin
6 2 2 3

We closed the original question as there was no real substance to it. As posters have said, if the OP wants to post the questions as questions, rather than just a link, we will be happy to help.

Aug 10, 2010 at 09:50 AM Kev Riley ♦♦
(comments are locked)
10|1200 characters needed characters left

The question has been closed Aug 10, 2010 at 09:49 AM by Kev Riley for the following reason:


1 answer: sort voted first

Answer 3 is a cartesian join, so you'll want to look at that.

Other than that, are you sure you took the class? I'd strongly suggest you study the provided book a bit more.

more ▼

answered Aug 10, 2010 at 08:47 AM

avatar image

Grant Fritchey ♦♦
137k 20 44 81

Maybe he should read your books instead! :)

Aug 10, 2010 at 09:02 AM Håkan Winther

I wasn't sure, seeing as the course said 'due in 2006'. So I figure either:

  • a - OP is a time traveller from the future, and probably doesn't need basic SQL help

  • b - OP is very late with homework, so probably won't matter if it's wrong anyway

Aug 10, 2010 at 09:03 AM Matt Whitfield ♦♦

I reckon OP is in the wrong place, anyway. Judging by Homework 2, it's a Postgres environment...

Aug 10, 2010 at 09:09 AM ThomasRushton ♦♦

Postgres or not, there's no join criteria for Track in that query. He's going to get some nasty data back.

Aug 10, 2010 at 09:46 AM Grant Fritchey ♦♦
(comments are locked)
10|1200 characters needed characters left

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x450
x162
x22
x9

asked: Aug 10, 2010 at 08:14 AM

Seen: 1291 times

Last Updated: Aug 10, 2010 at 08:32 AM

Copyright 2017 Redgate Software. Privacy Policy