SQL Queries from Multiple tables and Questions

Question -Employee_Details
EmpID
NVARCHAR(10)
Emp_FirstName
NVARCHAR(100)
Emp_LastName
NVARCHAR(100)
DateOfJoining
Datetime
Employee_Salary
EmpID
NVARCHAR(10)
Refers to Employee Details
PayPeriodId
INT
Refers to Master_PayPeriod
SalaryAmount
Money

DateofSalaryCreditedtoAccount
Datetime


Master_PayPeriod


PayPeriodID
INT

PayMonthYear
Datetime


Employee Details
Sample Data



000001
ABC
XYZ
01-Jan-2000

000002
Rahul
Y
13-Dec-2000

000003
Amit
S
12-Apr-2000

000004
Shobit
K
01-Jan-2000

000005
Harshit
J
13-Dec-2001

000006
Amrit
C
12-Apr-2002


Employee_Salary




000001
1
20000
02-May-12

000002
1
25000
02-May-12

000003
1
12000
02-May-12

000004
1
90000
02-May-12

000005
1
27000
02-May-12

000006
1
23000
02-May-12


Master_PayPeriod
Sample Data

1
Apr-12

2
May-12

3
Jun-12

4
Jul-12

5
Aug-12

6
Sep-12

7
Oct-12

8
Nov-12

9
Dec-12

10
Jan-13

11
Feb-13


12
Mar-13


a) Write a query to show salary of each employee for Month September ‘12
b) Write a query to show every Employees’ total Earned Salary for Financial Year 2012-13
c) Write a query to show Rahul’s monthly Earned Salary for Financial Year 2012-13

d) Write a query to show names of employees who has drawn annual salary more than 25000/-



1. What is SQL Server Agent?
2. How do you refresh a database?
3. Which TCP/IP port does SQL Server run on? How can it be changed?
4. What are the main requirements to install SQL Server 2012?
5. What are the authentication modes in SQL Server? How can it be changed?
6. How does the database recovery model impact database backups?
7. Is the native SQL Server 2005 backups are in clear text or in encrypted?
8. How can I verify that backups are occurring on a daily basis?
9. How do you know if your database backups are restorable?
10. How do you migrate a database from SQL Server 2005 to 2008 R2?
11. What are some common reasons why database restores fail?
12. What are the permissions required to perform backup and Restore?
13. How can you be notified if a native SQL Server database backup or restore fails via the native tools?
14. What are some common post restore processes?
15. How can full backups be issued without interrupting the LSN’s?
16. What is the database that has the backup and restores system tables?  
17. What are the backup and restore system tables?
18. How is a point in time recovery performed?
19. What are your recommendations to design a backup and recovery solution? Simply what is Backup Check list?
20. What options/arguments can be specified in a BACKUP LOG statement to keep inactive log records from being truncated?
21. What are all of the backup options?
22. What are all of the Restore options?
23. How much time does it take for full backup and restore of 500 GB database?
24. What are the issues you faced in backup and restore process?
25. How to perform the tail log backup?
26. What is piecemeal Restore?