Ad
Code
Diff
  • SELECT
      b.city_name kota,
      SUM(a.confirmed_cases) confirmed_cases,
      SUM(a.recovered_cases) recovered_cases,
      SUM(a.death_cases) death_cases
    FROM
      cases a
    JOIN 
      dati b
    ON a.dati_code = b.code
    GROUP BY
      kota
    ORDER BY
      confirmed_cases DESC
    • -- Code Here
    • SELECT
    • b.city_name kota,
    • SUM(a.confirmed_cases) confirmed_cases,
    • SUM(a.recovered_cases) recovered_cases,
    • SUM(a.death_cases) death_cases
    • FROM
    • cases a
    • JOIN
    • dati b
    • ON a.dati_code = b.code
    • GROUP BY
    • kota
    • ORDER BY
    • confirmed_cases DESC
Code
Diff
  • -- Code Here
    SELECT *
    FROM transactions
    WHERE customer IS NOT NULL
    ORDER BY store, total_price DESC
    • --- Code Here
    • -- Code Here
    • SELECT *
    • FROM transactions
    • WHERE customer IS NOT NULL
    • ORDER BY store, total_price DESC
Code
Diff
  • SELECT *
    FROM transactions
    WHERE customer IS NULL
    • -- Code Here
    • SELECT *
    • FROM transactions
    • WHERE customer IS NULL
Code
Diff
  • SELECT *
    FROM transactions
    WHERE store NOT IN ('BIE Store Jakarta','BIE Store Bandung')
    • -- Code Here
    • SELECT *
    • FROM transactions
    • WHERE store NOT IN ('BIE Store Jakarta','BIE Store Bandung')
Code
Diff
  • SELECT 
      date, 
      store, 
      total_price 
    FROM 
      transactions
    WHERE 
      date BETWEEN '2022-01-01' AND '2022-01-03'
    • -- Code Here
    • SELECT
    • date,
    • store,
    • total_price
    • FROM
    • transactions
    • WHERE
    • date BETWEEN '2022-01-01' AND '2022-01-03'