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
      employees
    WHERE
      salary >= 5000000 AND months >= 12
    ORDER BY
      salary DESC;
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • employees
    • WHERE
    • salary >= 5000000 AND months >= 12
    • ORDER BY
    • salary DESC;
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
    ORDER BY
      total_price ASC;
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • ORDER BY
    • total_price ASC;
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    WHERE
      customer LIKE 'D%' OR customer LIKE '%E';
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • WHERE
    • customer LIKE 'D%' OR customer LIKE '%E';
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    WHERE
      customer IS NOT null;
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • WHERE
    • customer IS NOT null;
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    WHERE
      customer LIKE 'S%r';
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • WHERE
    • customer LIKE 'S%r';
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    WHERE
      customer IS null;
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • WHERE
    • customer IS null;
Code
Diff
  • -- Code Here
    SELECT
      *
    FROM
      transactions
    WHERE
      store NOT IN ('BIE Store Jakarta','BIE Store Bandung');
    • --- Code Here
    • -- Code Here
    • SELECT
    • *
    • FROM
    • transactions
    • WHERE
    • store NOT IN ('BIE Store Jakarta','BIE Store Bandung');
Code
Diff
  • -- Code Here
    SELECT *
    FROM transactions
    WHERE
      store IN ('BIE Store Bandung','BIE Store Palembang','BIE Store Malang');
    • --- Code Here
    • -- 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 BETWEEN '2022-01-01' AND '2022-01-03';
    • --- Code Here
    • -- Code Here
    • SELECT
    • date,
    • store,
    • total_price
    • FROM transactions
    • WHERE
    • date BETWEEN '2022-01-01' AND '2022-01-03';
Code
Diff
  • -- Code Here
    SELECT
      transaction_id,
      date,
      store,
      total_price
    FROM transactions
    WHERE 
      store ='BIE Store Bandung' AND total_price <= 100000; 
    • --- Code Here
    • -- Code Here
    • SELECT
    • transaction_id,
    • date,
    • store,
    • total_price
    • FROM transactions
    • WHERE
    • store ='BIE Store Bandung' AND total_price <= 100000;
Code
Diff
  • -- Code here
    SELECT id, name, age, kota
    FROM customers
    WHERE kota = 'Tasikmalaya';
    • --- Code here
    • -- Code here
    • SELECT id, name, age, kota
    • 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
Loading more items...