# sql code

*label*Computer Science

*timer*Asked: Sep 11th, 2013

**Question description**

need the sql code

**SQL Functions**

1. Find the MORTALs whose Social Security Number ends in 8 using SUBSTRing.

2. What is 29 to the 6^{th} power?

3. Raise the price of the PARTs 5%. Display the current data plus the new price. Arrange the output so the quantity on hand descends.

4. Show the TEACHERs’ original homeroom numbers and the homeroom numbers without the character suffix (i.e. 10C would be 10).

5. Using the table STUDENT_CLASS, give me the class ID and the total number of students registered for each class.

6. I would like to know how many boats are at each marina. This information must come from the table MARINA_SLIP.

7. By category number, with grand totals, give me the number of SERVICE REQUESTs, total estimated hours, total hours spent and total remaining hours.

8. What STUDENTS have Fran in their name? Display the results in descending school id sequence.

9. List BOOKs published by Jove, Penguin, Plume and Scholastic. Organize by title within publisher.

10. By quantity descending within warehouse, display PARTs with quantity on hand > 25 or in warehouse 3.

11. Display CUSTOMER number, name, rep, balance, and
credit limit for all CUSTOMERs of Rep 20.
In addition, display this information for CUSTOMERs of rep 65 who have a
$10,000 credit limit. Arrange the output
by credit limit descending within rep ascending.** no more than two decimal
digits**

12. What
is the total cost to give teachers who currently earn less than $50,000 a 10%
raise? Use the SALARY table.** no more than two decimal digits**

13. What is the average royalty per book for
the titles in ROYALTY_SCHEDULE? **no more
than two decimal digits**