GROCERY STORE: Logistic Optimisation
Description:
You are the owner of the Grocery Store. All your products are in the database, that you have created after CodeWars SQL excercises!:)
You have reached a conclusion that you waste to much time because you have to many different warehouse to visit each week.
You have to find out how many different type of products you buy from each producer. If you take only few items from some of them you will stop going there to save the gasoline:)
In the results show producer
and count_products_types
which you buy from him.
Order the result by count_products_types
(DESC) then by producer
(ASC) in case there are duplicate amounts,
products table schema
- id
- name
- price
- stock
- producer
results table schema
- count_products_types
- producer
Note: there has been a critical change in the description and the column names long after the approval/publication of the kata so don't be surprised if you see solutions with different column names once you solved the kata (solutions weren't revalidated after the change because their was already too much of them).
Similar Kata:
Stats:
Created | Feb 22, 2018 |
Published | Feb 22, 2018 |
Warriors Trained | 9029 |
Total Skips | 736 |
Total Code Submissions | 22888 |
Total Times Completed | 6165 |
SQL Completions | 6166 |
Total Stars | 48 |
% of votes with a positive feedback rating | 72% of 738 |
Total "Very Satisfied" Votes | 445 |
Total "Somewhat Satisfied" Votes | 170 |
Total "Not Satisfied" Votes | 123 |
Total Rank Assessments | 4 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |