0% found this document useful (0 votes)
10 views2 pages

Dimash - Only.pdffile 1

The document contains a series of SQL queries for selecting data from orders, customers, and shippings tables, as well as creating new tables for products, comments, and suppliers. It includes commands for inserting data into these tables. Additionally, there are syntax errors in the insert statements that need correction.

Uploaded by

jvcjjw7hqc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Dimash - Only.pdffile 1

The document contains a series of SQL queries for selecting data from orders, customers, and shippings tables, as well as creating new tables for products, comments, and suppliers. It includes commands for inserting data into these tables. Additionally, there are syntax errors in the insert statements that need correction.

Uploaded by

jvcjjw7hqc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1)Select orders.order_id ,orders.item , customers.first_name ,customers.last_name, customers.

country
FROM orders
JOIN Customers
ON Customers.customer_id = Orders.customer_id

2)SELECT customers.first_name ,customers.last_name, Orders.order_id


FROM Customers
LEFT JOIN Orders
ON Customers.customer_id = Orders.customer_id

3)SELECT
shippings.shipping_id,shippings.status,customers.first_name,customers.last_name,customers.age ,custom
ers.country
FROM shippings
LEFT JOIN customers
on shippings.customer=customers.customer_id

4)CREATE TABLE products(


idint primary key,
name varchar(255),
price int);

5)create table comment(idint primary key,first_name varchar(255),last_name varchar(255),comment


varchar(255))

6)create table supplier(


idint primary key,
company varchar(255),
country varchar(255))

7)INSERT INTO products(id,name,price)


VALUES( 1,'VIVO100X', 10),
(2,'SAMSUNGA10',20),
(3,'LENOVOIK43',60),
(4,'BLACKBERRY7',80),
(5,'IPHONE16', 100);

8)INSERT INTO comment(id,first_name,last_name,comment)


VALUES
( 1,'MYRZABEK','DIMASH','TOP'),
(2,'DARKHAN','DIMAH','IPHone'),
(3,'SULTAN','IMASH','GAMES'),
(4,'NAERTAI','DASH','MATEM')
(5,'GGG','DIMA','BOX');

9)INSERT INTO supplier(Id,company,country)

Values ( 1,”Tez”,”KZ”),

( 2,”Uber”,”USA”),
(3,”Yandex”,”RU”),

(4,”Sui”,”PR”)

You might also like