Assignment2
Assignment2
finances. Assignment 2
Saint-Petersburg, 2025
4. There is a table in the TSQL2012 database that contains the scores (values
from 0 to 100) received by students in exams. Write a query that converts
the grades received by students from a system of 0 to 100 to a system of
0 to 1 (0 if the score is less than 60, 1 if the score is greater than or equal
to 60). Tables involved: Stats.Scores
5. TSQL2012 database has a table that contains order items. Write a query
that calculates for each order the number of items with a discount, print
the result in descending order of the number of items with a discount.
Tables involved: Sales.OrderDetails.
6. There is a table in a TSQL2012 database that contains a list of orders.
Write a query that determines which countries the orders were shipped
to. Sort the result alphabetically. Tables involved: Sales.Orders.