In: Computer Science
/*
01) Summarize all orders on the Sales.Orders table
for CUNY Fiscal year 2015 (July 1, 2014 through June 30, 215)
using only the columns (orderdate and freight)
*/
/*
02) Find all of the tables in the database whose schema name
is in the following list ('HR','Person','Production','Sales’)
Projected by FullyQualifiedTableName and the column count within the table
*/
/*
01) Summarize all orders on the Sales.Orders table
for CUNY Fiscal year 2015 (July 1, 2014 through June 30, 215)
using only the columns (orderdate and freight)
*/
SELECT * Sales.Orders WHERE freight='CUNY' AND orderdate BETWEEN
'2014/01/07' AND '2015/30/06';
/*
02) Find all of the tables in the database whose schema name
is in the following list ('HR','Person','Production','Sales’)
Projected by FullyQualifiedTableName and the column count within the table
*/
select owner, table_name, COUNT(column_name) AS
ColumnCount
from all_tab_columns
where owner in ('HR', 'Person', 'Production', 'Sales')
GROUP BY table_name;