0% found this document useful (0 votes)
19 views3 pages

Home Work

Uploaded by

Faisal Abdullah
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)
19 views3 pages

Home Work

Uploaded by

Faisal Abdullah
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/ 3

Name:Abdullah Faisal

Id:191-15-12967

create table customer(

CUST_NAME varchar(100),

CUST_ID int,

CUST_ADDRESS varchar(100),

CUST_PHN int,

CUST_Email varchar(100),

CUST_BILL int,

CUST_Cuntry varchar(100)

);

insert into
customer(CUST_NAME,CUST_ID,CUST_ADDRESS,CUST_PHN,CUST_Email,CUST_BILL,CUST_Cuntry)

values("ANNA",2002,"OTTOWA",123,"A@mail",339,"CANADA");

insert into
customer(CUST_NAME,CUST_ID,CUST_ADDRESS,CUST_PHN,CUST_Email,CUST_BILL,CUST_Cuntry)

values("REBEL", 2031 ,"VIRGINIA" ,124, "R@mail" ,346, "USA");

insert into
customer(CUST_NAME,CUST_ID,CUST_ADDRESS,CUST_PHN,CUST_Email,CUST_BILL,CUST_Cuntry)

values("MAK" ,2932 ,"TEXUS", 124 ,"M@mail" ,345 ,"USA");

insert into
customer(CUST_NAME,CUST_ID,CUST_ADDRESS,CUST_PHN,CUST_Email,CUST_BILL,CUST_Cuntry)

values("PERRY", 4645 ,"ONTARIO" ,123, "P@mail" ,500 ,"CANADA");

insert into
customer(CUST_NAME,CUST_ID,CUST_ADDRESS,CUST_PHN,CUST_Email,CUST_BILL,CUST_Cuntry)
values("ROSEN", 2455 ,"HERATH", 426 ,"RO@mail" ,339, "UK");

create table product (

Product_Name varchar(100),

Product_id int,

Product_price int,

Product_Amount int,

Product_origin varchar(100)

);

insert into product(Product_Name,Product_id,Product_price,Product_Amount,Product_origin)


values("CHEESE" ,123 ,25 ,65 ,"USA");

insert into product(Product_Name,Product_id,Product_price,Product_Amount,Product_origin)


values("MILK" ,1234 ,65, 92 ,"USA");

insert into product(Product_Name,Product_id,Product_price,Product_Amount,Product_origin)


values("BREAD" ,12345 ,20 ,40 ,"UAE");

insert into product(Product_Name,Product_id,Product_price,Product_Amount,Product_origin)


values("BUTTER", 1235, 35 ,35, "UK");

insert into product(Product_Name,Product_id,Product_price,Product_Amount,Product_origin)


values("CHIPS" ,12 ,25, 40, "Malaysia");

Select Product_Name from product where not Product_origin="Malaysia";

Select CUST_Name from customer where not CUST_Cuntry = "CANADA" Or "BANGLADESH";


Select CUST_ADDRESS from customer where CUST_Cuntry ="USA";

Select min(Product_price) from product;

Select AVG(Product_price) from product where Product_origin = "USA";

You might also like