SQL Queries Specify the following SQLite queries on the chinook database.  A schema for the database is in the picture. You can access the database online through your web browser at the SQLite Tutorial, or you can download the chinook.db database from the tutorial site and run it on a labnet machine or your own machine.  SQLite is already installed on labnet machines. You must submit typed queries, not handwritten ones, and save them in a .pdf document.  There is no need to submit the output (results). Each query is worth 1 mark, but some are more difficult than others.   Queries to Specify 5. List the customer id, last name and email address of all customers with a Yahoo or Hotmail email address. 6. List the album id and number of tracks for all albums with 15, 16 or 17 tracks, in descending order of the number of tracks. 7. Find the maximum track length in milliseconds. 8. List the last name, first name and hire date of all employees born in 1961 to 1969 inclusive 9. List the genre name and count of all tracks in each genre, in descending order of track count (so the genre with the most tracks is listed first) 10. List the customer id, customer's last name, customer email and support rep's last name for all customers who live in Canada.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

SQL Queries

Specify the following SQLite queries on the chinook database.  A schema for the database is in the picture.

You can access the database online through your web browser at the SQLite Tutorial, or you can download the chinook.db database from the tutorial site and run it on a labnet machine or your own machine.  SQLite is already installed on labnet machines.

You must submit typed queries, not handwritten ones, and save them in a .pdf document.  There is no need to submit the output (results).

Each query is worth 1 mark, but some are more difficult than others.

 

Queries to Specify

5. List the customer id, last name and email address of all customers with a Yahoo or Hotmail email address.

6. List the album id and number of tracks for all albums with 15, 16 or 17 tracks, in descending order of the number of tracks.

7. Find the maximum track length in milliseconds.

8. List the last name, first name and hire date of all employees born in 1961 to 1969 inclusive

9. List the genre name and count of all tracks in each genre, in descending order of track count (so the genre with the most tracks is listed first)

10. List the customer id, customer's last name, customer email and support rep's last name for all customers who live in Canada.

SSQLITE
playlists
9 Playlistid: INTEGER
Name: NVARCHAR(120)
invoices
customers
Customerld: INTEGER
FirstName: NVARCHAR(40)
LastName: NVARCHAR(20)
TUTORIAL
Invoiceld: INTEGER
Customerld: INTEGER
InvoiceDate: DATETIME
BillingAddress: NVAR.
BillingCity: NVARCHA
Company: NVARCHAR(80)
Address: NVARCHAR(70)
City: NVARCHAR(40)
State: NVARCHAR(40)
Country: NVARCHAR(40)
PostalCode: NVARCHAR(10)
Phone: NVARCHAR(24)
Fax: NVARCHAR(24)
Email: NVARCHAR(60)
SupportRepld: INTEGER
playlist_track
Playlistid: INTEGER
Trackld: INTEGER
4 more columns..
media_types
9 MediaTypeld: INTEGER H
Name: NVARCHAR(120)
invoice_items
tracks
Invoiceltemid: INTEGER
4 9 Trackld: INTEGER
Name: NVARCHAR(200)
Invoiceld: INTEGER
Trackld: INTEGER
UnitPrice: NUMERIC
Quantity: INTEGER
Albumld: INTEGER
genres
9 Genreld: INTEGER
Name: NVARCHAR(120)
MediaTypeld: INTEGER
Genreld: INTEGER
Composer: NVARCHAR(220)
employees
9 Employeeld: INTEGER
LastName: NVARCHAR(20)
FirstName: NVARCHAR(20)
Title: NVARCHAR(30)
ReportsTo: INTEGER
BirthDate: DATETIME
Milliseconds: INTEGER
Bytes: INTEGER
albums
9 Albumld: INTEGER
Title: NVARCHAR(160)
Artistid: INTEGER
UnitPrice: NUMERIC
artists
HireDate: DATETIME
9 Artistid: INTEGER
Address: NVARCHAR(70)
7 more columns..
Name: NVARCHAR(120)
Transcribed Image Text:SSQLITE playlists 9 Playlistid: INTEGER Name: NVARCHAR(120) invoices customers Customerld: INTEGER FirstName: NVARCHAR(40) LastName: NVARCHAR(20) TUTORIAL Invoiceld: INTEGER Customerld: INTEGER InvoiceDate: DATETIME BillingAddress: NVAR. BillingCity: NVARCHA Company: NVARCHAR(80) Address: NVARCHAR(70) City: NVARCHAR(40) State: NVARCHAR(40) Country: NVARCHAR(40) PostalCode: NVARCHAR(10) Phone: NVARCHAR(24) Fax: NVARCHAR(24) Email: NVARCHAR(60) SupportRepld: INTEGER playlist_track Playlistid: INTEGER Trackld: INTEGER 4 more columns.. media_types 9 MediaTypeld: INTEGER H Name: NVARCHAR(120) invoice_items tracks Invoiceltemid: INTEGER 4 9 Trackld: INTEGER Name: NVARCHAR(200) Invoiceld: INTEGER Trackld: INTEGER UnitPrice: NUMERIC Quantity: INTEGER Albumld: INTEGER genres 9 Genreld: INTEGER Name: NVARCHAR(120) MediaTypeld: INTEGER Genreld: INTEGER Composer: NVARCHAR(220) employees 9 Employeeld: INTEGER LastName: NVARCHAR(20) FirstName: NVARCHAR(20) Title: NVARCHAR(30) ReportsTo: INTEGER BirthDate: DATETIME Milliseconds: INTEGER Bytes: INTEGER albums 9 Albumld: INTEGER Title: NVARCHAR(160) Artistid: INTEGER UnitPrice: NUMERIC artists HireDate: DATETIME 9 Artistid: INTEGER Address: NVARCHAR(70) 7 more columns.. Name: NVARCHAR(120)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY