Skip to content

📊This repository contains the complete solution to the Level C SQL Task, assigned as part of the Week 3 deliverables during the Summer Internship Program at Celebal Technologies.

Notifications You must be signed in to change notification settings

Ani811625/CSI-Assignment3

Repository files navigation

CSI Assignment 3 - Celebal Technologies SQL Internship (Week 3)

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.


📌 Tasks Covered

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

🛠️ Technologies Used

  • 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

🧪 Sample Data

Each task includes:

  • Table schema (CREATE TABLE)
  • Sample data (INSERT INTO)
  • SQL queries to solve the problem

🚀 How to Use

  1. Clone the repository
  2. Open the .sql file in SQL Server Management Studio or Azure Data Studio
  3. Execute task-wise blocks to verify logic and output

📩 Contact

Aniruddha Sarkar
📧 aniruddhas387@gmail.com
🌐 LinkedIn


This assignment is part of the Celebal Technologies Summer Internship Program 2025 (Batch 2 - SQL Domain).

About

📊This repository contains the complete solution to the Level C SQL Task, assigned as part of the Week 3 deliverables during the Summer Internship Program at Celebal Technologies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published