White Lightning
White Lightning
White Lightning
Select all data from a table
SELECT * FROM customers;
Learn more
White Lightning
Select specific columns from a table
SELECT name, email FROM customers;
Learn more
White Lightning
Select data from a table with conditions
SELECT * FROM customers WHERE country = 'United States';
Learn more
White Lightning
Order data by a column
SELECT * FROM customers ORDER BY name ASC;
Learn more
White Lightning
Order data by a column
SELECT country, COUNT(*) AS count FROM customers GROUP BY country;
Learn more
White Lightning
Aggregate functions:SUM, AVG, and COUNT
SELECT SUM(total_spent) AS total_revenue FROM orders;
Learn more
White Lightning
Join two tables
SELECT customers.name, orders.total_spent FROM custom
ers INNER JOIN orders ON customers.id = orders.customer_id;
Learn more
White Lightning
Update data in a table
UPDATE customers SET email = 'new_email@example.com' WHERE id = 1;
Learn more
White Lightning
Delete data from a table
DELETE FROM customers WHERE id = 1;
Learn more
White Lightning
Create a new table
CREATE TABLE products ( id INT
NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, price DECIMAL(10,2) NOT NULL, PRIMARY KEY (id) );
Learn more
Learn more