Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

SQL Assignment - Computer Science

Rating
-
Sold
-
Pages
1
Grade
A+
Uploaded on
25-12-2025
Written in
2023/2024

SQL Assignment for students to test their basics. It includes theory and code questions on SQL and its commands. A must-do for high schoolers before delving into Python-SQL connectivity.

Institution
Course

Content preview

1. Consider the following SQL statement. What type of statement is this? (1)
SELECT * FROM employee;
(a) DML (b) DDL (c) DCL (d) TCL
2. The ________ clause of SELECT query allows us to select only those rows in the result that
satisfy a specified condition. (1)
(a) where (b) from (c) having (d) like
3. Write SQL commands for the following on the basis of given table: (3)
LIBRARY

No Title Author Type Pub Qty Price
1 Data Structure Lipschutz DS McGraw 4 217
Computer
2 Studies French FND Galgotia 2 75
3 Advanced Pascal Schildt PROG McGraw 4 350
4 Dbase dummies Palmer DBMS PustakM 5 130
5 Mastering C++ Gurewich PROG BPB 3 295
6 Guide Network Freed NET Zpress 3 200
7 Mastering Foxpro Seigal DBMS BPB 2 135
8 DOS guide Norton OS PHI 3 175
Basic for
9 beginners Morton PROG BPB 3 40
Mstering
10 Window Cowart OS BPB 1 225

(a) Select all the PROG type published by BPB from Library
(b) Display a list of all books with Price more than 130 and sorted by Qty.
(c) Display all the books sorted by Price in ascending order.

4. Give the following table: (2)
STUDENT

No Name Stipend Stream AvgMark Grade Class
1 Karan 400.00 Medical 78.5 B 12B
2 Divakar 450.00 Commerce 89.2 A 11C
3 Divya 300.00 Commerce 68.6 C 12C
4 Arun 350.00 Humanities 73.1 B 12C
5 Sabina 500.00 Nonmedical 90.6 A 11A
6 John 400.00 Medical 75.4 B 12B
7 Robert 250.00 Humanities 64.4 C 11A
8 Rubina 450.00 Nonmedical 88.5 A 12A
9 Vikas 500.00 Nonmedical 92.0 A 12A
10 Mohan 300.00 Commerce 67.5 C 12C
Give the output of following SQL statement:
(i) SELECT TRUNCATE(AvgMark) FROM Student1 WHERE AvgMark<75;
(ii) SELECT ROUND(AvgMark) FROM Student1WHERE Grade=’B’;
(iii) SELECT CONCAT(Name,Stream) FROM Student1 WHERE Class=’12A’;
(iv) SELECT RIGHT(Stream,2) FROM Student1;

5. State the difference between WHERE and GROUP BY clasuse with suitable example. (2)

Written for

Institution
Secondary school
School year
5

Document information

Uploaded on
December 25, 2025
Number of pages
1
Written in
2023/2024
Type
Exam (elaborations)
Contains
Only questions

Subjects

Free
Get access to the full document:
Download

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
erleen

Get to know the seller

Seller avatar
erleen Amity University Punjab
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
6 months
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions