Question:
How do I create queries to support the following reports in SQL ?
Sal
2010-04-29 22:34:51 UTC
Can you create queries for these following topics? I must compile the queries to support the database’s key reports. Structured query language (SQL) will be used to create the following five reports.

* all employees and their roles and responsibilities by company
* an audit report demonstrating user, time and date of incident, and degree of failure
* an inventory report by vendor
* a purchase order report by vendor
* a project report showing all lots and features, sorted by subdivision/sites

Compile the queries necessary to support each report. I just need the queries for SQL. I am a programmer and I need help with a blueprint for school. It is confusing and I am trying to learn it.
Three answers:
anonymous
2010-04-29 22:59:08 UTC
1.

SELECT employee_name,roles_and_responsibilities

FROM employees

ORDER BY company_name



2.

SELECT user_name,time_and_date,degree_of_failure

FROM incident

ORDER BY time_and_date



3.

SELECT vendor_name,SUM(stocks_left)

FROM inventory

GROUP BY vendor_name



4.

SELECT vendor_name,COUNT(order_date)

FROM purchase_order

GROUP BY vendor_name



5.

SELECT *

FROM project

ORDER BY subdivision ASC, site
?
2014-12-31 12:17:45 UTC
Google SQL tutorials. That will be a great resource
Serge M
2010-04-30 08:33:17 UTC
Teach yourself at http://www.sql-ex.ru/.

Free of charge.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...