S
S
shellnet2021-04-01 20:59:38
SQL
shellnet, 2021-04-01 20:59:38

How to create a SQL query according to the following scheme?

According to the existing database schema, which has the following tables: stock (cars for sale), shop (dealerships), mark (models), manufacturer (car manufacturer), create a query for all car manufacturers (manufacturer.name), indicating how many specific cars for sale at each dealership in descending order. Also, take into account that for some manufacturers there may not be records in the stock table, while these manufacturers must be present in the final selection

606609f2b3d89555887279.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2021-04-01
@Rsa97

LEFT JOIN, GROUP BY, COUNT(), SORT BY

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question