Embed
Email

MY SQL Select Queries

Document Sample
MY SQL Select Queries
Description

MY SQL Select Queries

Categories
Tags
Stats
views:
2
posted:
11/8/2011
language:
English
pages:
1
Select* from customer;

select customer_num, fname,company,state from customer order by state

desc;

select customer_num, fname,company,state from customer order by state

asc;

select customer_num, fname,company,state from customer order by state

asc, fname desc;

select stock_num,description,unit_price,unit_price*1.1 from stock;

select stock_num,description,unit_price as OldPrice,unit_price*1.1

NewPrice from stock;

select COUNT(distinct state)as NumberStates from customer;

Select fname,lname,address1,address2,city from customer;

select* from customer where state='CA';

select distinct city from customer where state='CA';

select distinct city from customer where state='CA'order by city desc;

Select fname,lname,address1,address2 from customer where customer_num=3;

select stock_num from stock group by stock_num;

select state,COUNT(customer_num) from customer group by state;

select city,COUNT(customer_num) from customer group by city;

select description,Avg(unit_price) from stock group by description;

select* from items;


Related docs
Other docs by W A Vinod Madu...
System Request template
Views: 53  |  Downloads: 1
Merge Sort C++ Code(C++ Programming)
Views: 30  |  Downloads: 0
Unicron Project(edit)
Views: 6  |  Downloads: 0
Data Structuer And Algorithms - Queue
Views: 6  |  Downloads: 0
Design and Analysis of Algorithms Intruduction
Views: 14  |  Downloads: 0
Information Techknology Project Guide
Views: 4  |  Downloads: 0
Introduction to Graphs(Programming Tools)
Views: 6  |  Downloads: 1
Computer System Structures Lessions
Views: 41  |  Downloads: 0
MY SQL Select Queries
Views: 2  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!