Ans: select title,artist from album,track where track.song="Alison"
Find the title and artist who recorded the song 'Alison'
Explain timestamp datatype?
Construct the Query using the Tables album and track of music database
album | ||||||
Asin | title | artist | price | release | label | Rank |
B00000255F | Born to Run | Bruce Springsteen | 13.98 | 1975-08-25 | Sony | 521 |
B000002UAU | Sgt. Pepper's Lonely Hearts Club Band | The Beatles | 13.49 | 1967-06-01 | Capitol | 218 |
... |
Track | |||
Album | dsk | posn | Song |
B00000255F | 1 | 1 | Thunder Road |
B00000255F | 1 | 2 | |
B00000255F | 1 | 3 | Night |
B00000255F | 1 | 4 | Backstreets |
B00000255F | 1 | 5 | Born to Run |
... | |||
B000002UAU | 1 | 1 | Sgt. Pepper's Lonely Hearts Club Band |
B000002UAU | 1 | 2 | With a Little Help from My Friends |
B000002UAU | 1 | 3 | Lucy in the Sky With Diamonds |
B000002UAU | 1 | 4 | Getting Better |
B000002UAU | 1 | 5 | She's Leaving Home |
... |
How many rows may be retrieved by the select statement in the following SQL code samples?
2. having keyword should always follow the group by
3. A result set based on a query with a proper join condition is called a cartesian product
4. distinct requires an additional sorting step using a worktable
5. subquery always return single column of data
6. once you create a column and declare its datatype, you cannot change that datatype without dropping and recreating the table.