SQL_Chapter4_ASSIGNMENT
---1. What is the cost of the costliest software development in Basic? select TITLE, SCOST from SOFTWARE where SCOST=(select MAX(SCOST) from SOFTWARE) --2. Display the Cost of Package Developed By each Programmer select PNAME, title, dcost, sum(dcost) over(partition by pname) as [total cost of packages] from SOFTWARE --3. Who are the Programmers who celebrate their Birthdays during the Current Month? select PNAME, month(DOB) as [month] from PROGRAMMER where month(DOB)=MONTH(GETDATE()) select PNAME, datename(mm, DOB) as [month] from PROGRAMMER where DATENAME(MM, DOB)= DATENAME(mm, getdate()) --4. Display the sales values of the Packages Developed by each Programmer? select distinct PNAME, sum(SCOST*SOLD) over(partition by pname) as [sales values] from SOFTWARE --5. Display the Number of Packages sold by Each Programmer select distinct PNAME, COUNT(title) over(partition by pname) as[packages sold] from SOFTWARE select pname, COUNT(title) from SOFTWARE group by PNAME ---6. Display ea...