Ad
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      employees
    ORDER BY
      salary DESC
    LIMIT 10;
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • employees
    • ORDER BY
    • salary DESC
    • LIMIT 10;
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    WHERE
      customer IS NOT null
    ORDER BY
      store ASC
      ,total_price DESC;
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • WHERE
    • customer IS NOT null
    • ORDER BY
    • store ASC
    • ,total_price DESC;
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    ORDER BY
      total_price DESC;
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • ORDER BY
    • total_price DESC;
Code
Diff
  • -- Code Here
    SELECT 
      * 
    FROM 
      transactions
    WHERE 
      customer LIKE 'S%' AND customer LIKE '%r';
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • WHERE
    • customer LIKE 'S%' AND customer LIKE '%r';
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    ORDER BY
      total_price ASC;
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • ORDER BY
    • total_price ASC;
Code
Diff
  • SELECT
      *
    FROM
      transactions
    WHERE
      customer IS NOT NULL;
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • WHERE
    • customer IS NOT NULL;
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    WHERE customer IS NULL;
    • --- Code Here
    • -- 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 * 
    FROM
      transactions
    WHERE 
      store IN ('BIE Store Bandung', 'BIE Store Palembang', 'BIE Store Malang');
    • -- Code Here
    • SELECT *
    • FROM
    • transactions
    • WHERE
    • store IN ('BIE Store Bandung', 'BIE Store Palembang', 'BIE Store Malang');
Code
Diff
  • -- Code Here
    SELECT 
      date
      ,store
      ,total_price 
    FROM 
      transactions
    WHERE 
      date >= '2022-01-01' AND date <= '2022-01-03'
    • --- Code Here
    • -- Code Here
    • SELECT
    • date
    • ,store
    • ,total_price
    • FROM
    • transactions
    • WHERE
    • date >= '2022-01-01' AND date <= '2022-01-03'
Code
Diff
  • -- Code Here
    SELECT * FROM transactions 
    WHERE store = 'BIE Store Bandung' AND 
    total_price <= 100000 ;
    • --- Code Here
    • -- Code Here
    • SELECT * FROM transactions
    • WHERE store = 'BIE Store Bandung' AND
    • total_price <= 100000 ;
Code
Diff
  • -- Code here
    SELECT * FROM customers
    WHERE kota = 'Tasikmalaya';
    
    
    • --- Code here
    • -- Code here
    • SELECT * FROM customers
    • WHERE kota = 'Tasikmalaya';
Code
Diff
  • -- Code Here
    SELECT name AS nama, age AS umur FROM customers;
    • --- Code Here
    • -- Code Here
    • SELECT name AS nama, age AS umur FROM customers;
Code
Diff
  • -- Code Here
    SELECT name, age FROM customers;
    • --- Code Here
    • -- Code Here
    • SELECT name, age FROM customers;
Code
Diff
  • -- Code here
    SELECT * FROM customers;
    • -- Code here
    • SELECT * FROM customers;