Hi i need Help. i use MYSQL command line.
THE QUESTION ARE BELOW
please check the answer before you submit because sometimes query gives error thank you
For Full database of SQL you can DOWNLOAD from this link:
https://drive.google.com/file/d/1xh1TcBfMtvKoxvJr7Csgnts68fF53Q1t/view?usp=sharing
-------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
What are the total sales for each year. Note that you will need to use the YEAR function. Order by year with the newest year first.
-------------------------------------------------------
How many employees have no customers?
------------------------------------------------------------------
List the total sales for each genre. Display the genre with the most sales first and the genre's in alphabetical order.
-------------------------------------------------------------------------------------
Which artist has generated the most sales in dollars? You CANNOT use the LIMIT keyword.
----------------------------------------------------------------------
List the playlist with the most tracks (songs) including how many tracks are included in the playlist. You CANNOT use the LIMIT keyword.
------------------------------------------------------------------------------------------
Query 1
Select Year(InvoiceDate) as Year,sum(total) as "Total Sales" from Invoice group by Year(InvoiceDate) Order by Year(InvoiceDate) desc;
Query 2:
Select EmployeeId,LastName,FirstName from Employee where EmployeeId not in(Select SupportRepId from Customer);
Query 3:
Select Genre.Name as Genre,sum(UnitPrice) as "Total Sales" from
Genre inner join Track on Genre.GenreId=Track.GenreId group by
Genre.Name order by sum(UnitPrice) desc;
Query 4:
Select Artist.name as "Artist Name",sum(UnitPrice) as "Total Sale"
from Track Inner join Album on Track.AlbumId=Album.AlbumId inner
join Artist on Artist.ArtistID=Album.ArtistID group by Artist.Name
order by sum(UnitPrice) desc limit 1;
if you still have any Problem regarding this question please comment and if you like my code please appreciate me by thumbs up thank you.........
Hi i need Help. i use MYSQL command line. THE QUESTION ARE BELOW please check the...
The Chinook team would like to throw a promotional Music Festival for their top 10 customers who have spent the most in a single invoice. Write a query that returns the first name, last name, and invoice total for the top 10 invoices ordered by invoice total descending. MediaType Artist Album Track Artistld Albumld MediaTypeld Trackld Title Name Name Name Artistld Albumld MediaTypeld Genreld Composer Genre Playlist Track Playlist Milliseconds Genreld Playlistld Playlistld Name Bytes Name Trackld UnitPrice InvoiceLine Employee...
Write an SQL query against the Chinook Database v1.4. Each query must run successfully using DB Browser for SQLite. Create the exact query below. Must use sub query. I saw that a similar solution for this question used IF and CONCAT functions which do not work and return errors. If it is possible to use the CASE function in place of IF that would be greatly appreciated. Also I really hate to ask but if it could be organized neatly...
Using the database: Write SQL queries for each of the questions below. 1. Find the media type which has 100 or more tracks. Print the name of such media type. Number of rows returned in the result = 3 A) Find the playlists which have one or more tracks that have never been purchased in California (CA). Print the Id, and the name of such playlists. Number of rows returned in the result = 18 B) Find the customers who...
I need help in SQL management studio please. Question: Create the same query as query 5, but only include artists if they have 'Pop' Genre. Previous question: Create a list of all composers and artists in your database. Include two columns in your record set (the names of the returned columns are in brackets): 'Composer/Artist Name' and 'Type' (which will indicate whether your results are from the composer or artist table). Order by 'Composer/Artist Name'. This is the answer for...