Questions 1 Report the donors first and last names arranging
Questions:
1.) Report the donors first and last names arranging alphabatically by last name
2.) Report last name and phone number arranging by their phone
3.) Arrange the donors list ( ALL COLUMNS ) by the descending order of last names.
4.) Report the state and the last name of donors. Arrange alphabetically the last names withing states
5,) Now, Arrange the donors last names in descending order withing states.
6.) Now vice versa. Order the state in descending order, but withing states arrange last names in ascending order.
7.) Report donor last name, city and phone number. Arrange phone number highest to lowest in each city.
8.) Write your own query that will arange the table in certain ways.
DONORNO DINAME 101 Abrams 102 Aldinger 103 Beckman. 104 Berdahl 105 Borneman 106 Brock 107 Buyert. 108 Cetinsoy 109 Chisholm 118 Herskowitz 119 Jefts 110 Crowder 111 Dishman 112 Duke 113 Evans 114 Frawley 115 Guo 116 Hammann 117 Hays Name DONORNO DLNAME DENAME PHONE DSTATE DCITY SID SNAME F MGT 987 POIRER F FIN 763 PARKER 218 RICHARDS M ACC 359 PELNICK F FIN M MGT 862 FAGIN 748 MEGLIN M MGT 506 LEE M FIN 581 GAMBRELI, F MGT 126 ANDERSON M ACC 444 LINSTERBOK M CIS 445 MINSTERBOK F CIS 446 NINSTERBOK F CIS 447 OINSTERBOK M CIS Name SID SEX GPA. Donor Table DPHONE DS DCITY DENAME 9018 GA London Louis 1521 GA Paris Dmitry 8247 WA Sao Paulo Gulsen. 8149 WI Sydney Samuel 1888 MD Bombay Joanna 2142 AL London. Scott 9355 AK New York Aylin 6346 AZ Rome Girwan 4482 MA Oslo John 6872 MT London Thomas 8103 ME Oslo Robert 6513 NC Stockholm Anthony 3903 NC Helsinki. Michelle 4939 FIL Tokyo Peter 4336 GA Singapore Ann 4785 MN Perth Todd 6247 MN Moscow John 5369 ND Kabaul. John 1352 SD Lima. Null? N NUMBER (38) CHAR (15) CHAR (15) NUMBER (4) CHAR (2) CHAR (15) Student Table GPA. Null? NOT NULL CHAR (3) NOT NULL CHAR (10) CHAR (1) CHAR (3) NUMBER (4,2)Solution
1.) Report the donors first and last names arranging alphabatically by last name
A) SELECT DFNAME,DLNAME FROM DONOR ORDER BY DLNAME ASC;
2.) Report last name and phone number arranging by their phone
A) SELECT DLNAME,DPHONE FROM DONOR ORDER BY DPHONE ASC;
3.) Arrange the donors list ( ALL COLUMNS ) by the descending order of last names.
A) SELECT * FROM DONOR ORDER BY DLNAME DESC;
4.) Report the state and the last name of donors. Arrange alphabetically the last names withing states
A) SELECT DSTATE,DLNAME FROM DONORS ORDER BY DSTATE,DLNAME;
5,) Now, Arrange the donors last names in descending order withing states.
A) SELECT DSTATE,DLNAME FROM DONORS ORDER BY DSTATE,DLNAME DESC;
6.) Now vice versa. Order the state in descending order, but withing states arrange last names in ascending order.
A) SELECT DSTATE,DLNAME FROM DONORS ORDER BY DSTATE DESC,DLNAME ASC;
7.) Report donor last name, city and phone number. Arrange phone number highest to lowest in each city.
A) SELECT DLNAME,DCITY,DPHONE FROM DONORS ORDER BY DCITY,DPHONE DESC;
8.) Write your own query that will arange the table in certain ways.
A) SELECT * FROM DONORS ORDER BY DCITY;

