Lab Database

You might also like

You are on page 1of 1

Question 1 SELECT ProductName, UnitPrice As 'Harga Lama', UnitPrice + UnitPrice * 3.33/100 As 'Harga Baru', ROUND(UnitPrice + UnitPrice * 3.

33/100,1) As 'Harga Baru 10sen', CategoryID From Products Where CategoryID = 8 Question2 SELECT Country, LastName + ',' + Firstname As Name, BirthDate, '8 November, 2011' AS Tod ay, DateDiff(Year,BirthDate,'1 November, 2011') AS Age, DateDiff(Year,BirthDate, '1 November, 2012') AS Age2, GetDate() AS Today, DateAdd(Year,DateDiff(Year,BirthDate,'1 November, 2012'),BirthDate) AS ' 12 month from today' From Employees WHERE Country = 'UK' Question3 SELECT EmployeeID,FirstName+','+ UPPER (Lastname) As FullName,Notes From employees Where Notes LIKE '%MA%'

You might also like