나는 이렇게 학습한다/Algorithm & SQL 405

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..

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..

SQL Basics: Truncating

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..