Preview

Sql Hw

Satisfactory Essays
Open Document
Open Document
546 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Sql Hw
1. SELECT PARTNUMB, PARTDESC
FROM PART Query1 | PARTNUMB | PARTDESC | AX12 | IRON | CX11 | MIXER |
WHERE UNONHAND BETWEEN 100 AND 200

2. SELECT PARTNUMB, PARTDESC, (UNITPRCE*UNONHAND) ONHANDVALUE
FROM PART
WHERE VALUE >= 1000

Query1 | PARTNUMB | PARTDESC | ONHANDVALUE | AX12 | IRON | $1,866.80 | BH22 | TOASTER | $3,320.25 | BT04 | STOVE | $4,432.89 | BZ66 | WASHER | $16,221.40 | CB03 | BIKE | $8,250.00 | CX11 | MIXER | $6,490.40 | CZ81 | WEIGHTS | $22,669.92 |

3. SELECT CUSTNUMB, CUSTNAME
FROM CUSTOMER
WHERE CUSTNAME LIKE 'Nelson,*'

Query1 | CUSTNUMB | CUSTNAME | 522 | Nelson, Mary |

4. SELECT *
FROM PART
GROUP BY ITEMCLSS
ORDER BY PARTNUMB

SELECT PART.PARTNUMB, PART.PARTDESC, PART.ITEMCLSS, PART.WRHSNUMB, PART.UNITPRCE
FROM PART
ORDER BY PART.ITEMCLSS, PART.PARTNUMB

Query1 | PARTNUMB | PARTDESC | ITEMCLSS | WRHSNUMB | UNITPRCE | BT04 | STOVE | AP | 2 | $402.99 | BZ66 | WASHER | AP | 3 | $311.95 | AX12 | IRON | HW | 3 | $17.95 | BH22 | TOASTER | HW | 3 | $34.95 | CA14 | SKILLET | HW | 3 | $19.95 | CX11 | MIXER | HW | 3 | $57.95 | AZ52 | SKATES | SG | 2 | $24.95 | BA74 | BASEBALL | SG | 1 | $4.95 | CB03 | BIKE | SG | 1 | $187.50 | CZ81 | WEIGHTS | SG | 2 | $108.99 |

5. SELECT SUM(BALANCE) AS TOTAL
FROM CUSTOMER
WHERE SLSRNUMB = 12

Query1 | TOTAL | $451.35 |

6. SELECT DISTINCT SLSRNUMB, SUM(BALANCE) AS TOTAL
FROM CUSTOMER
GROUP BY SLSRNUMB

Query1 | SLSRNUMB | TOTAL | 3 | $1,903.00 | 6 | $590.45 | 12 | $451.35 |

SELECT DISTINCT SLSRNUMB, SUM(BALANCE) AS TOTAL
FROM CUSTOMER
GROUP BY SLSRNUMB
HAVING COUNT(CUSTNUMB) >= 4

Query1 | SLSRNUMB | TOTAL | 6 | $590.45 |

7. SELECT ORDERS.ORDNUMB, ORDDTE, ORDLNE.PARTNUMB, ORDLNE.QUOTPRCE
FROM ORDERS, ORDLNE
WHERE ORDERS.ORDNUMB = ORDLNE.ORDNUMB

Query1 | ORDNUMB | ORDDTE | PARTNUMB | QUOTPRCE | 12489 | 9/2/1991 | AX12 | $14.95 | 12491 | 9/2/1991 | BT04 | $402.99 | 12491

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Hsm 260 Week 4 Case Study

    • 660 Words
    • 3 Pages

    Material purchase @5,000 lbs | $275,000 | $280,000 | $5,000 | U | Materials usage | $180,000 | $178,000 | $2,000 | F | Production volume | 950 units | 900 units | 50 units | F | Wages @4,00 hrs | $60,000 | $58,700 | $1300 | F | Labor usage @$16 per hr | $96,000 | $97,000 | $1000 | U | Research & Development expenses | $22,000 | $25,000 | $3000 | U…

    • 660 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Forth Dbq Analysis

    • 100 Words
    • 1 Page

    Forth, in document 6, Testimonies of SS-Men from Various camps it states, “right, about thirty to forty women were gassed in one gas chamber. The Jewish women were forced to undress in an open place close to the gas chamber, and were driven into the gas chamber by the above mentioned SS members and the Ukrainian auxiliaries.” The Nazi’s plan was to kill as many Jews they could, so their final solution was gas chamber. The quote above is from a Nazi soldier, about how they gas chambered Jews. The women were first suppose undress and then the were gassed.…

    • 100 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Dbq Step by Step Help

    • 436 Words
    • 2 Pages

    – The order given with the documents may be helpful: Compare/Contrast, or Chronological order question.…

    • 436 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Ralph Henwood was paid salary of $64,600 during 2012 by Odesto Company. In addition, during the year Henwood started his own business as a public accountant and reported a net business income of $48,000 on his income tax return for 2012. Compute the following:…

    • 778 Words
    • 4 Pages
    Powerful Essays
  • Satisfactory Essays

    dbq section 1

    • 459 Words
    • 2 Pages

    At the beginning of the 1st century C.E ., when Buddhism began to spread from India to China, it encountered mixed results. Many Chinese had accepted the practice of Buddhism and stood by its policies when others were penetrating Buddhism's absence from past beliefs and used it as a pushover for social and political problems. Still others stayed impartial, wanting to mesh the differences of belief systems in China to create a one of a kind Chinese culture. Documents 2 and 3 support the spread of buddhism in China, while documents 4 and 6 examined and dampened the spread of buddhism in china in the 1st century C.E., Documents 1 and 5 share both sides of the story, discouragements and encouragements of the spread of Buddhism in China, but equally share an understanding. It provides a third prospective.…

    • 459 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Hw Accounting

    • 737 Words
    • 3 Pages

    2-35. Which of the following would not tend to make a manufacturer choose a perpetual inventory system?…

    • 737 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    dbq cschoolwork

    • 1261 Words
    • 6 Pages

    nativists and the KKK looked with hatred towards immigrants, the government cracked down on radicals…

    • 1261 Words
    • 6 Pages
    Good Essays
  • Good Essays

    Jd 750 Case Study

    • 1054 Words
    • 5 Pages

    Our Company is now entering the heavy industrial market with the new construction tractor JD-750 a heavy bulldozer with 110 horse power and a fully automatic dual-path hydrostatic drive. These features are truly unique for our company since it is significantly larger than our previous product line. JD-750 should be priced right at Caterpillars D-5 and not higher based on the unique features of our product and I recommend pricing JD-750 at $64082.00 (Table A). The price suggested will meet our objective of maximizing profits in the first few years of the launch before our competitors enter the market. JD-750 is a niche product with technological innovation and will attract heavy construction…

    • 1054 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    database mgnt

    • 730 Words
    • 3 Pages

    5. Identify and discuss the serious data redundancy problems exhibited by the file structure shown in Figure P1.5.…

    • 730 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Database Sql Server

    • 328 Words
    • 2 Pages

    Data mining uses business intelligence tools and techniques on a variety of data sources brought together in a data warehouses. true…

    • 328 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    wrk of database

    • 416 Words
    • 2 Pages

    It will produce a single attribute (hotelNo) giving the number of hotels room prices greater 100.…

    • 416 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Introduction to SQL: Querying a Clintrial Database Exercise Manual Toby Odenheim Introduction to SQL: Querying a Clintrial Database Page i of 16 Version 1 – January, 2008 Introduction to SQL: Querying a Clintrial Database…

    • 1215 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    Dbms Utilization

    • 262 Words
    • 2 Pages

    The most popular definition of an RDBMS is often considered to be less precise, some argue that the presentation of data as a collection of rows and columns are qualified enough to be regarded as an RDBMS. Typically, a database is said to meet the criteria as RDBMS if it meets the laws specified in 12 Codd law, but in fact, most database systems do not fully support the implementation of these laws Codd.…

    • 262 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Pl/Sql Programs

    • 1293 Words
    • 6 Pages

    16. Write a Pl/Sql program to raise the employee salary by 30%, who have completed their 40 years of service. declare cursor c3 is select * from emp where extract(year from sysdate)-extract(year from hiredate)>40 for update; e emp%rowtype; begin open c3; loop fetch c3 into e; exit when c3%notfound; update emp set sal=e.sal+(30/100)*e.sal where current of c3; end loop; close c3; end; / 17. Write a Pl/Sql program to check the given number is Armstrong ‘or’ not. declare n number(3); s number(3):=0; t number(3); begin n:=&n; t:=n; while t>0 loop s:=s+power((t mod 10),3); t:=trunc(t/10); end loop; if(s=n) then dbms_output.put_line('The given number ' || n || 'is an armstrong number'); else dbms_output.put_line('The given number ' || n || 'is not an armstrong number'); end if; end; / 18. Write a Pl/Sql program to display top 10 rows in emp table based on their job and salary. declare cursor c1 is select * from emp order by sal desc; e emp%rowtype; begin…

    • 1293 Words
    • 6 Pages
    Good Essays
  • Powerful Essays

    Basic SQL

    • 1550 Words
    • 16 Pages

    When you are executing an SQL command for any RDBMS, the system determines the best way to carry out your request and SQL engine figures out how to interpret the task.…

    • 1550 Words
    • 16 Pages
    Powerful Essays

Related Topics