The document outlines a series of SQL tasks including data manipulation and querying operations on a database. It covers inserting and updating records in tables, performing joins and subqueries, and utilizing various SQL functions and data types. Additionally, it includes instructions for creating a new table and inserting sample data into it.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views1 page
Exam Mid 01.practice
The document outlines a series of SQL tasks including data manipulation and querying operations on a database. It covers inserting and updating records in tables, performing joins and subqueries, and utilizing various SQL functions and data types. Additionally, it includes instructions for creating a new table and inserting sample data into it.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
1.
Insert data into products table
2. Insert data into Customers table 3. Update product price of product that has ProductId 61 4. Delete one product you inserted in question 1 5. Show CompanyName, OrderId, OrderDate, Shipdate, ProductName, UnitPrice, Discount, Amount (Calcualted) by joining table 6. Show Each order (include OrderId) and order amount 7. Rewrite question 6 using subquery 8. Show the customers who haven't placed any order 9. Rewrite question 7 using join 10. Show CustomerId, City and Employee FisrtName, LastName, City including all rows from both tables 11. Show the country and customer count 12. Show the country and customer count - include only customers of Finland and Germany 13. Show the country and customer count include only rows that has customer count greater than or equal to 3 14. Rewrite question 13 using subquery 15. Rewrite question 13 using CTE 16. Show use of wild cards: %, [],[-], [^], _ 17. Show use of functions: LEN, LEFT, RIGHT, SUBSTRING, CHARINDEX, PATINDEX, REPLACE, REPLICATE, SPACE, CONCAT, RAND, ROUND, FLOOR, CEILING, ISNULL, CAST, CONVERT 18. Create a table using data type VARCHAR, NVARCHAR, TINYINT, DECIMAL, MONEY, DATE, DATETIME, TIME and insert 5 rows of sample data