create table Customers --Creating a table
(customer_id int,
first_name varchar(20),
last_name varchar(20),
age int,
country varchar(20))

insert into Customers --Inserting a value format
(customer_id,
first_name,
last_name,
age,
country)

values --Values to be inserted
(1, 'John', 'Doe', 31, 'USA'),
(2, 'Robert', 'Luna', 22, 'USA'),
(3, 'David', 'Robinson', 22, 'UK'),
(4, 'John', 'Reinhardt', 25, 'UK'),
(5, 'Betty', 'Doe', 28, 'UAE'),
(6, 'John', 'Reinhardt', 25, '')

create table Orders
(order_id int,
item varchar(20),
amount int,
customer_id int)

insert into Orders
(order_id,
item,
amount,
customer_id)

values
(1, 'Keyboard', 400, 4),
(2, 'Mouse', 300, 4),
(3, 'Monitor', 12000, 3),
(4, 'Keyboard', 400, 1),
(2, 'Mousepad', 250, 2)

create table Shippings
(shipping_id int,
status varchar(20),
customer int)

insert into Shippings
(shipping_id,
status,
customer)

values
(1, 'Pending', 2),
(2, 'Pending', 4),
(3, 'Delivered', 3),
(4, 'Pending', 5),
(5, 'Delivered', 1)

select * from Customers --Select all columns from customers

select * from Orders

select * from Shippings

select * from customers --Return to the country is USA
where country = 'USA'

select distinct(country) from customers

select * from orders
order by customer_id

select * from customers
where country = 'USA' and age = 22

select * from customers
where country = 'USA' or age = 22

select * from customers
where not country = 'USA'

select * from customers
where country is null

update customers
set country = 'Mexico'
where customer_id = '6'

delete from Customers
where customer_id = 6

select max(amount) from orders

select min(amount) from orders

select count(amount) from orders

select avg(amount) from orders

select sum(amount) from orders

select * from customers
where last_name like 'R%'

select * from orders
where amount between 200 and 400 

select * from customers
where country in ('UK', 'UAE')

select item as product from orders

select first_name.customers, last_name.customers, order_id from customers
inner join orders
on customers.customer_id = orders.customer_id