Banner Ad

    A    L    W    A    Y    S           D    E    S    I    R    E           T    O           L    E    A    R    N           S    O    M    E    T    H    I    N    G           U    S    E    F    U    L   

Thursday, August 11, 2011

Database management systems DBMS

download practical 3 question DBMS 1
answers for dbms 1 practical 3

--Q1
select *
from customer
order by customer_num desc;


--Q2
select *
from customer
where lname like '[A-G]%'
order by state,city;


--Q3
select stock_num,manu_code,unit_price as old_price,unit_price*115/100 as new_price
from stock
where manu_code='ANZ';


--Q4
select *
from items;


select COUNT(*)
from items;


--Q5
select *
from customer


select COUNT(*)
from customer;


--Q6
select *
from orders;


select AVG(ship_charge)as average
from orders;


--Q7
select MAX(ship_charge)as max, MIN(ship_charge)as min
from orders;


--Q8
select COUNT(*)
from stock
where description='baseball gloves';


--Q9


select *
from stock;


select AVG(unit_price)
from stock
where description='tennis racquet';


--Q10
select stock_num,manu_code,unit_price as old_price,unit_price*115/100 as new_price,
round(unit_price*115/100,1)
from stock
where manu_code='ANZ';


--Q11
select  sum(unit_price) as sum
from stock;


--Q12
select MAX(quantity) as highest_quantity_ordered
from items;


--Q13
select *
from stock;


select COUNT(distinct manu_code)
from stock;

0 comments:

Related Posts Plugin for WordPress, Blogger...

your comments