일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- FOR
- and
- len
- join
- index
- Python
- list
- 위코드
- DART
- range
- split
- lambda
- 파이썬
- enumerate
- sum
- iNT
- decorator
- LOWER
- WECODE
- map
- slice
- count
- If
- Sorted
- or
- SQL
- js
- STR
- MAX
- Algorithm
- Today
- Total
목록SQL (69)
코드로 우주평화
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 ..
For this challenge you need to create a simple HAVING statement, you want to count how many people have the same age and return the groups with 10 or more people who have that age. people table schema id name age return table schema age total_people Solution: SELECT age, COUNT(age) AS total_people FROM people GROUP BY age HAVING COUNT(age) >= 10 Result: age total_people 16 13 54 11 47 14 99 11 4..
Hello SQL! Return a table with a single column named Greeting with the phrase 'hello world!' Please use Data Manipulation Language and not Data Definition Language to solve this Kata Solution: SELECT 'hello world!' AS "Greeting" The reason 'Greeting' is enclosed in double quotation marks is that uppercase letters are changed to lowercase letters unless they are enclosed in double quotation marks..
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..
You are given a table named repositories, format as below: ** repositories table schema ** project commits contributors address The table shows project names of major cryptocurrencies, their numbers of commits and contributors and also a random donation address ( not linked in any way :) ). Your job is to remove all numbers in the address column and replace with '!', then return a table in the f..
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..
You are given a table named repositories, format as below: ** repositories table schema ** project commits contributors address The table shows project names of major cryptocurrencies, their numbers of commits and contributors and also a random donation address ( not linked in any way :) ). For each row: Return first x characters of the project name where x = commits. Return last y characters of..
You have access to two tables named top_half and bottom_half, as follows: top_half schema id heads arms bottom_half schema id legs tails You must return a table with the format as follows: output schema id heads legs arms tails species The IDs on the tables match to make a full monster. For heads, arms, legs and tails you need to draw in the data from each table. For the species, if the monster ..
For this challenge you need to create a SELECT statement, this select statement must have NULL handling, using COALESCE and NULLIF. If no name is specified you must replace with [product name not found] If no card_name is specified you must replace with [card name not found] If no price is specified you must throw away the record, you must also filter the dataset by prices greater than 50. eusal..
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 "..