전체 글819 SQL Basics: Simple JOIN For this challenge you need to create a simple SELECT statement that will return all columns from the products table, and join to the companies table so that you can return the company name. products table schema id name isbn company_id price companies table schema id name You should return all product fields as well as the company name as "company_name". NOTE: Your solution should use pure SQL... 2022. 5. 23. 2022년 21주차 '사이드 프로젝트 1차 결과물' Weekly growth '벨로그 워드 클라우드' 구현 처음에는 프론트에서 워드 클라우드를 구현하려고 했으나 적당한 라이브러리가 없었고, 내 포지션이 아니다 보니 구현에 시간이 걸릴 것 같았다. 그래서 백엔드에서 워드클라우드를 구현하고 이미지를 파일로 저장. 곧바로 프론트에 이미지 파일을 보내주는 로직으로 변경했다. 데이터베이스나 s3를 사용하지 않기 때문에 이미지를 파일로 직접 관리했고 규모가 작은 서비스인만큼 이런저런 외부 툴을 붙이는 것은 지양하고자 했다. 기능적으로는 처음 기획한대로 구현했다. 하지만 아직 해결해야할 문제들이 많다. 데이터를 분석하는 시간이 너무 오래 걸리고, 예외처리나 실패 케이스에 대한 대응도 부족하다.. 또한 로딩화면도 추가해야 하고, UI도 개선해야 한다. 특히 속도면에서 .. 2022. 5. 22. Beginner Series #2 Clock Clock shows h hours, m minutes and s seconds after midnight. Your task is to write a function which returns the time since midnight in milliseconds. Example: h = 0 m = 1 s = 1 result = 61000 Input constraints: 0 2022. 5. 22. SQL Basics: Simple SUM For this challenge you need to create a simple SUM statement that will sum all the ages. people table schema id name age select table schema age_sum (sum of ages) Solution: SELECT SUM(age) AS age_sum FROM people; Result: age_sum 5451 2022. 5. 21. Returning Strings Write a select statement that takes name from person table and return "Hello, how are you doing today?" results in a column named greeting [Make sure you type the exact thing I wrote or the program may not execute properly] Solution: SELECT concat('Hello, ', name, ' how are you doing today?') AS greeting FROM person concat appends string arguments. '||' By using symbols, the same result can be a.. 2022. 5. 20. Even or Odd SQL Notes: You will be given a table, numbers, with one column number. Return a table with a column is_even containing "Even" or "Odd" depending on number column values. numbers table schema number INT output table schema is_even STRING Solution: SELECT CASE WHEN number%2=0 THEN 'Even' ELSE 'Odd' END AS is_even FROM numbers In psql, 'if' is 'case when ~ then ~ else ~'. 2022. 5. 19. 이전 1 ··· 78 79 80 81 82 83 84 ··· 137 다음