Professional Documents
Culture Documents
Home Work
Home Work
Home Work
Jan’ 03
1. What is Normalization?
Jan’ 04
5. List the SQL Server Editions with differences between each of them.
Jan’ 05
3. What is the maximum number of instances that could be created on one server?
9. Explain the similarities and differences between Delete and Truncate statements.
11. List all the data types with their description and usage.
12. What are String, Date and Aggregate functions with Examples?
Jan’ 07
1. Implement Constraints.
Jan’ 08
2. Differences between char and varchar data types, with each of its advantages and disadvantages.
5. What does a schema mean and how is it useful? Why did Microsoft change the username to
6. Create a table with the columns id and name. Write a query to display an output having a single
7. Explain UNION, UNION ALL, INTERSECT, EXCEPT, CUBE and ROLLUP operators with examples.
9. Create a table Products with columns productid, productname and productprice. Also create
another table Orders with columns productid, orderid and some order details. Insert data into each
of them, ensuring that the Products table has a record for each product with a unique id.
10. Create a table Students with columns studentid, studentname and another table Subjects with
columns subjected and subjectname. Insert data into each of them. Write a cross join query on the
tables.
11. Create tables Products and Customers. Write a query to display the products that can be bought
by a customer.
12. Adventure Works
a. Retrieve all information from sales.salesorderheader table that are shipped in the year 2002.
b. Select list of people whose first name starts with character ‘A’ and last name has an ‘e’.
c. List the name and the number of employees in each department in the AdventureWorks database.
I am not interested in those departments that have less than one employee.
Jan’ 09
2. Write a query to display all the products whether or not they have an order for it. Replace the
3. What does each of the system databases master, model, msdb and tempdb mean?
5. What is an Extent?
10. When will sub queries and joins be used in a query? What are the advantages and disadvantages
13. Create a table Rent with columns Monthnames and RentAmmount. Insert data into the table.
Write a query to display paid if rentamount is paid in full, not paid if unpaid and not paid in full if
AdventureWorks Database.
16. Insert and Delete rows from a View. Observes the changes.
17. What are indexed views? What are its advantages and disadvantages? What are the limitations
Jan’ 10
4. Create a table (temporary) with columns Id and Name that may look like
Id Name
1 A
2 B
3 C
1 A
2 B
3 C
3 C
Write a query to display Id that has duplicate rows and the no. of occurrences of duplicates. The
5. Explain the differences between table variables and temporary tables, with each of its advantages
11. Explain different isolation levels. What is the default isolation level in SQL Server?
13. Without using a Create - Insert - Select sequence of creating a table based on an already existing
14. How to create a view that doesn’t let it get dropped automatically by the deletion of the table it
depends on. (For the base table be dropped successfully, the view has to be dropped prior to it).
Jan’ 11
1. What are nested and recursive triggers? What is the maximum number of levels for nested and
recursive triggers.
4. Create a table called Cursors (id int, name char(10)) in every database.
5. Create two databases Uranus and Uranus_Hist. In each of the databases create a table Employee
with the columns (Id, Name, Address, City and State). The Employee table in Uranus_Hist database
has to have another column Ins_DateTime to record the date and time a row is inserted into it.
Implement a trigger on Employee table in Uranus database for an Update and Delete of rows in it
such that the old record i.e, the one before update (or) delete operation must be inserted into the
columns inserted date, inserted user when an insertion is made and modified date and modified
Jan’ 12
2. What are Ranking (or) Analytical functions (Rank(), Dense_Rank(), Row_Number(), Ntile() )?
4. What is BCP? What are the differences between Bulk Insert and BCP Commands?
6. Write a query using CTE and Row_Number function to delete the duplicate rows.
7. Create tables’ t1, t2 and t3 with columns Id, Name, City and State. Insert values into the tables
such that the table t1 has the values only for Id and Name, table t2 has values for Id, Name, State
and table t3 has the values for Id, Name and City.
b. Delete the rows from the tables’ t2 and t3 that are not present in t1.
Jan’ 14
4. What are user defined data types? What are its advantages and disadvantages?
SSRS
Jan’ 15
1. Create a report with Report Server Project Wizard on Employees table from AdventureWorks
database.
Jan’17
1. Conditional Hiding
Create a report on SSRS table to display the rows having sales greater than 300.
2. Cascading Parameters
Create a table with columns (Country, State, City, Street). Insert values into the table to look like,
Australia …. …. ….
…
Create a report to take parameters for Country, State, City and Street. Report has to generated by
giving parameter values one after the other filtering the data based on previous selection.
( Firstly, the parameter value for Country has to be selected among the values provided, say (USA,
India, Australia). Then for the selected Country, list of States in that Country has to be displayed. Next,
3. Create a stored procedure for SSRS that takes State as a Parameter and passes multi values to the
procedure.
4. For questions 2 and 3, create a footer to display the parameter values entered.
Jan’ 18
Create a report to display the columns from SSRS. The report must be grouped by State and also has to
have another column that calculates the running value of the sales column. The output may look
something like,
a. Create a drill down report to see the product information (Not sales, only Product) on expanding the
page?
Jan’ 19
Create a report to repeat the employee details Employee Id, Employee Name, Title, Birth Date and
Qualification for every employee. Have a header ‘Employee Details’ for the Report. The Output may
look like,
Employee Details
4. Why are sub reports used, when creating another data set could serve the purpose?
1. What is the difference between SQL Server Destination and OLE DB Destination?
2. Create a package on Employees table in AdventureWorks that would load data from
1 to <=100 in table1
3. Create a flat file with Customer Id and Name. The Name in the flat file has to be the full name of
the employee with delimiter tab (or) | between first and last name.
Create a package to import the data from flat file to the database. The table in the database must
have the columns Customer Id, First Name and Last Name.
4. Find the expression to change the file name in the connection manager dynamically.
5. What is the difference between Merge and Union All data transformations?
Jan’ 24
1. Create a query to separate the first name and last name.
2. What are LookUp cache modes in SSIS and explain the difference between each of them.
4. Create a package to LookUp the data in two tables’ source and reference. If there is a match, copy
the record to a table, say Match. For all the unmatched records, perform a Fuzzy LookUp with a
threshold limit of 50% to separate the records into two tables FuzzyMatch and Error.
5. Create a package to LookUp the data in two tables’ Source and Reference. If there is any match,
update the record in Transactions table and for no match insert the record in to the Transactions
table.
1. Create a package to load the flat files to an OLE DB destination. The files after loaded into the
database have to be moved to an archive. Use a ForEachLoop container.
Jan’ 27
2. Create a flat file of Customer information with header and footer. Load the file to an OLE DB
destination, removing the header and footer off the flat file.
3. Create an Audit table with columns Load Id, File Name, Rows in the File, Rows Loaded, Rows
Rejected, Process Start Time, Process End Time. Create a package for Audit, running the package
would update the columns in Audit table..
SSAS
Jan’ 29
1. What are the advantages and disadvantages of Star and Snow Flake schemas?