This repository contains the solutions to Level-C SQL tasks (Task 1 to Task 20) assigned during Week 3 of the Celebal Technologies Summer Internship Program.
| Task No. | Description |
|---|---|
| 1 | Identify projects with consecutive task end dates and display their start and end dates using grouping logic |
| 2 | Find names of students whose best friends got higher salary than them |
| 3 | Find all symmetric pairs (X, Y) and (Y, X) from a 2D function table |
| 4 | Aggregate stats for each contest by combining submissions and views |
| 5 | For each day of the contest, display number of hackers and lowest hacker ID with name |
| 6 | Calculate Manhattan distance using min/max LAT_N and LONG_W from a STATION table |
| 7 | Print all prime numbers ≤ 1000 in a single line separated by '&' |
| 8 | Pivot OCCUPATIONS table to display names under Doctor, Professor, Singer, and Actor columns |
| 9 | _Reserved |
| 10 | _Reserved |
| 11 | _Reserved |
| 12 | Display the percentage ratio of cost by Job Family across India and International |
| 13 | Compute month-on-month cost-to-revenue ratio of a Business Unit (BU) |
| 14 | Show headcount of Sub Bands and percentage (without joins/subqueries) |
| 15 | Retrieve top 5 employees by salary (without using ORDER BY) |
| 16 | Swap values of two columns in a table without a third variable |
| 17 | Create login, user, and assign db_owner permissions |
| 18 | Find weighted average cost of employees month-wise by BU |
| 19 | Calculate error in average salary due to missing '0' key |
| 20 | Copy only new data from source table to target table without indicators |
- SQL Server
- Common Table Expressions (CTEs)
- Window Functions (
ROW_NUMBER,RANK,COUNT OVER) - Aggregate Functions (
SUM,AVG,ROUND,CEILING) - DDL/DML (Table creation, insertion, updates)
- User and permission management in SQL Server
Each task includes:
- Table schema (
CREATE TABLE) - Sample data (
INSERT INTO) - SQL queries to solve the problem
- Clone the repository
- Open the
.sqlfile in SQL Server Management Studio or Azure Data Studio - Execute task-wise blocks to verify logic and output
Aniruddha Sarkar
📧 aniruddhas387@gmail.com
🌐 LinkedIn
This assignment is part of the Celebal Technologies Summer Internship Program 2025 (Batch 2 - SQL Domain).