MIS235finalprojectqueries

MIS235finalprojectqueries - Countries Customer #: Se l e c...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Countries Customer #: Se l e c t Dis t i n c t Cus t ome r s . C o u n t r y , COUNT(Cus t ome r s . C u s t ome r I D ) FROM MIS235 . c u s t ome r s GROUP BY cus t ome r s . c o u n t r y ORDER BY Coun t (C u s t ome r s . c u s t om e r i d ) DESC Revenue by Country: SELECT Dis t i n c t Cus t ome r s . C o u n t r y , SUM(Orde r d e t a i l s . U n i t P r i c e *O r d e r d e t a i l s . Q u a n t i t y ) FROM Mis235 .Cu s t ome r s , Mis235 .O r d e r s , Mis235 .O r d e rD e t a i l s WHERE MIS235 .Cu s t ome r s . C u s t ome r ID=MIS235 .O r d e r s . C u s t ome r I D AND Mis235 .O r d e r s . O r d e r I D=Mi s 2 35 .O r d e r d e t a i l s . O r d e r I D GROUP BY Cus t ome r s . C o u n t r y ORDER BY SUM(Orde r d e t a i l s . U n i t P r i c e *O r d e r d e t a i l s . Q u a n t i t y ) D ESC Rev by Employee: Se l e c t Orde r s . Emp l o y e e ID , Orde r s . S h i p C ou n t r y , SUM( Orde r d e t a i l s . U n i t P r i c e * Orde r d e t a i l s . Q u a n t i t y ) FROM Mis235 .O r d e r d e t a i l s , MIS235 .O r d e r s WHERE MIS235 .O r d e r d e t a i l s . O r d e r I D =MIS235 .O r d e r s . O r d e r I D GROUP BY Orde r s . Emp l o y e e ID , Orde r s . S h i p C ou n t r y ORDER BY SUM( Orde r d e t a i l s . U n i t P r i c e * O rde r d e t a i l s . Q u a n t i t y ) DESC Rev by Country by Employee Se l e c t Orde r s . Emp l o y e e ID , Orde r s . S h i p C ou n t r y , SUM( Orde r d e t a i l s . U n i t P r i c e * Orde r d e t a i l s . Q u a n t i t y ) FROM Mis235 .O r d e r d e t a i l s , MIS235 .O r d e r s WHERE MIS235 .O r d e r d e t a i l s . O r d e r I D =MIS235 .O r d e r s . O r d e r I D GROUP BY Orde r s . Emp l o y e e ID , Orde r s . S h i p C ou n t r y ORDER BY Orde r s . Emp l o y e e ID , SUM( Orde r d e t a i l s . U n i t P r i c e * O rde r d e t a i l s . Q u a n t i t y ) DESC ...
View Full Document

Ask a homework question - tutors are online