일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 위코드
- lambda
- index
- join
- iNT
- 파이썬
- STR
- enumerate
- LOWER
- MAX
- slice
- list
- If
- or
- Algorithm
- len
- js
- SQL
- map
- Python
- split
- range
- sum
- count
- DART
- decorator
- FOR
- WECODE
- Sorted
- and
- Today
- Total
목록SQL (69)
코드로 우주평화
For this challenge you need to create a SELECT statement that will contain data about departments that had a sale with a price over 98.00 dollars. This SELECT statement will have to use an EXISTS to achieve the task. departments table schema id name sales table schema id department_id (department foreign key) name price card_name card_number transaction_date resultant table schema id name Soluti..
You are the owner of the Grocery Store. All your products are in the database, that you have created after CodeWars SQL exercises! :) Customer often need to now how much really they pay for the products. Manufacturers make different sizes of same product so it is hard to compare prices, sometimes they make packages look big, but the weight of the product is small. Make a SELECT query which will ..
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..
Practise some SQL fundamentals by making a simple database on a topic you feel familiar with. Or use mine, populated with a wealth of Sailor Moon trivia. sailorsenshi schema id senshi_name real_name_jpn school_id cat_id cats schema id name schools schema id school Return a results table - sailor_senshi, real_name, cat and school - of all characters, containing each character's high school, their..
Given the table below: ** names table schema ** id prefix first last suffix Your task is to use a select statement to return a single column table containing the full title of the person (concatenate all columns together except id), as follows: ** output table schema ** title Don't forget to add spaces. Solution: SELECT CONCAT(prefix,' ',first,' ',last,' ',suffix) AS title FROM names You can use..
Input You'll have a table like the following: namegreeting Austin Gaylord Hola que tal #4702665 Kacie Zulauf Bienvenido 45454545 tal #470815 BD. WA470815 Output In this practice you'll need to extract from the greeting column the number preceeded by the # symbol and place it in a new column named user_id. namegreetinguser_id Austin Gaylord Hola que tal #4702665 4702665 Kacie Zulauf Bienvenido 45..
You are given a table random\_string that has the following format: random_string schema text The text field holds a single row which contains a random string. Your task is to take the random string and split it on each vowel (a, e, i, o, u) then the resultant substrings will be contained in the output table, formatted as: output table schema results Note that the vowels should be removed. If th..
There is truly no magic in the world; the Hogwarts Sorting Hat is SQL-based, its decision-making powers are common operators and prospectIve students are merely data - names, and two columns of qualities. students id name quality1 quality2 Slytherin are being quite strict this year and will only take students who are evil AND cunning. Gryffindor will take students who are brave but only if their..
Given the following table 'decimals': decimals table schema id number1 number2 Return a table with a single column towardzero where the values are the result of number1 + number2 truncated towards zero. Solution: SELECT TRUNC(number1 + number2) AS towardzero FROM decimals Result: towardzero 1 2 0 2 2 1 Reference: ROUND / TRUNC / MOD 반올림과 버림 그리고 나머지값 구하기 round .round(data) : 반올림하여 정수로 변환 .round(d..
Given a demographics table in the following format: ** demographics table schema ** id name birthday race you need to return a table that shows a count of each race represented, ordered by the count in descending order as: ** output table schema ** race count Solution: SELECT race, COUNT(id) FROM demographics GROUP BY race ORDER BY count DESC Result: race count American Indian or Alaska Native 2..