본문 바로가기

Study Note58

Subquery 1) When a Subquery is needed     When multiple operations need to be performed        → Determine the time value to charge the fees        → Add extra fee based on order amounts        → Calculate the final estimated delivery fee based on the applied weights    When the results of operations are needed in conditional statements        → When wanting to divide food expenses into high/medium/low .. 2024. 3. 21.
Replace Data in SQL and IF Statements String Manipulation1. REPLACE: Replace specified characters with others.2. SUBSTRING: Extract specific characters.3. CONCAT: Combine multiple strings for formatting.Conditional Statements1. IF: if(condition, value when condition is true, value when condition is false)2. CASE WHEN END: case when condition1 then value(expression)1 when condition2 then value(expression)2 else value(expressi.. 2024. 3. 20.
Calculating/Categorizing/Sorting Raw Data  Calculating ( + ) Not only addition but also multiplication and division are possible.select food_preparation_time, delivery_time, food_preparation_time + delivery_time as total_timefrom food_orders  result   Sum & Averageselect sum(food_preparation_time) total_food_preparation_time, avg(delivery_time) avg_delivery_timefrom food_orders    CountBy adding COUNT(1) or (*.. 2024. 3. 20.
Understanding database and SQL What is SQL and database SQL stands for Structured Query Language, a standardized programming language used to manage data in relational database management systems (RDBMS). A database is an organized collection of data stored electronically, designed to efficiently manage and retrieve data for applications and users.  I learned about handling tables, which gather data, and the way columns, whic.. 2024. 3. 19.