Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Questions: 1.) Due to a territory change all phone number values have increase b

ID: 3796815 • Letter: Q

Question

Questions:

1.) Due to a territory change all phone number values have increase by 1000. Report the donors last name, first name, city and incremented phone number.

2.) Write the above query with the last column header name Increased_phone

3.) Write the above query with the last column header name "Increased Phone"

4.) Due to a lack of numeric fields lets pretend the amount each donor has pledged = dphone - donorn. Report donors last name, phone number and donor number and the amount_pledge.

5.) Now report those donors whoe pledge amount is greater than 5000

6.) Now order the donors whose pledge is over 5000 by the amount they pledged.

7.) Extend query 1. Now report those donor names, their phone number and incr_phone number whose phone number evern after the incrmennt does not exceed 3000.

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)

Explanation / Answer

1) Since the Donors Phone numbers increased by 1000 we have to update the same in Donor table.

The Update is given by

update Donor set Dphone=Dphone+1000;

Next we can display the values using

select dlname,dfname,dcity,dphone from donor;

(or)

select dlname,dfname,dcity,dphone+1000 from donor;

If the values should not be Updated

2) select dlname,dfname,dcity,dphone as Increased_phone from donor;

3) select dlname,dfname,dcity,dphone as "Increased phone" from donor;

4) select dlname,dphone,donorno,dphone-donorno as amount_pledge from donor;

5) select dlname,dphone,donorno,dphone-donorno as amount_pledge from donor where amount_pledge>5000;

6) select dlname,dphone,donorno,dphone-donorno as amount_pledge from donor where amount_pledge>5000 order by amount_pledge;

7) select dlname,dfname,dphone,dphone+1000 as dp as Increased_phone from donor where dp<3000;