count18 Count the Digit Take an integer n (n >= 0) and a digit d (0 2022. 8. 5. SQL Basics: Simple JOIN with COUNT or this challenge you need to create a simple SELECT statement that will return all columns from the people table, and join to the toys table so that you can return the COUNT of the toys people table schema id name toys table schema id name people_id You should return all people fields as well as the toy count as "toy_count". Solution: SELECT p.id, p.name, COUNT(t.name) AS toy_count FROM people .. 2022. 7. 19. GROCERY STORE: Logistic Optimisation 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 st.. 2022. 7. 16. SQL Basics: Top 10 customers by total payments amount Overview For this kata we will be using the DVD Rental database. You are working for a company that wants to reward its top 10 customers with a free gift. You have been asked to generate a simple report that returns the top 10 customers by total amount spent ordered from highest to lowest. Total number of payments has also been requested. The query should output the following columns: customer_i.. 2022. 7. 14. SQL Basics: Simple JOIN and RANK For this challenge you need to create a simple SELECT statement that will return all columns from the people table, and join to the sales table so that you can return the COUNT of all sales and RANK each person by their sale_count. people table schema id name sales table schema id people_id sale price You should return all people fields as well as the sale count as "sale_count" and the rank as ".. 2022. 7. 10. GROCERY STORE: Support Local Products You are the owner of the Grocery Store. All your products are in the database, that you have created after CodeWars SQL excercises!:) You care about local market, and want to check how many products come from United States of America or Canada. Please use SELECT statement and IN to filter out other origins. In the results show how many products are from United States of America and Canada respec.. 2022. 7. 7. 이전 1 2 3 다음