본문 바로가기

SQL69

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.
SQL with Sailor Moon: Thinking about JOINs... 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.. 2022. 7. 6.
SQL: Concatenating Columns 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.. 2022. 7. 4.
SQL easy regex extraction 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.. 2022. 7. 3.
SQL: Regex String to Table 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.. 2022. 7. 3.
SQL with Harry Potter: Sorting Hat Comparators 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.. 2022. 7. 1.