Write a PL/SQL program to check whether a date falls on weekend i.e. SATURDAY or SUNDAY input give input as 5sep 1984
1. Use SQL commands to perform following operations: a. Display a list of available databases b. Create the database (choose any appropriate name in the format c. Select your database d. Create a table: i. Create a relation with the name DEPARTMENT ii. It has four attributes namely Dept_id, Dept_name, Building, and Budget iii. Dept_id is an integer, Dept_name is a character string of maximum length 20, Building is a character string of maximum length 15, and Budget is a number with 12 digits in total, 2 of which are after the decimal point iv. The create table command should also specify Dept_name attribute as not null and set a default value for Building to ‘A’ e. Drop the table DEPARTMENT f. Add attribute Phone to DEPARTMENT relation using Alter command g. Drop attribute Budget from a relation DEPARTMENT by using Alter command h. Modify datatype of Dept_id to varchar(25) using Alter command 2. Put all your output screenshots along with SQL commands in a single PDF file and upload in Moodle
Ques- create a SQL query .....on
Table : STUDENT
Admno 101 , 102 , 103 , 104 & 105
Name
Ayushi
heena
Jitender
meena
Marks
52, 95 , 89 , 65 ,98
1) Write a create table query
2) To displey al details of all students.
3) To dsplay al details in descending order of marks.
4) To display admno and name of all students whose name starts with 'A.
4 To display the maximum and minimum marks from the table students
5) To dsplay al details of students whose marks are between 80 to 95 inclusive
Ques- create a SQL query .....on
Table : STUDENT
Admno 101 , 102 , 103 , 104 & 105
Name
Ayushi
heena
Jitender
meena
Marks
52, 95 , 89 , 65 ,98
1) Write a create table query
2) To displey al details of all students.
3) To dsplay al details in descending order of marks.
4) To display admno and name of all students whose name starts with 'A.
4 To display the maximum and minimum marks from the table students
5) To dsplay al details of students whose marks are between 80 to 95 inclusive
Posted about 6 hours ago
Ques- create a SQL query .....on
Table : STUDENT
Admno 101 , 102 , 103 , 104 & 105
Name
Ayushi
heena
Jitender
meena
Marks
52, 95 , 89 , 65 ,98
1) Write a create table query
2) To displey al details of all students.
3) To dsplay al details in descending order of marks.
4) To display admno and name of all students whose name starts with 'A.
4 To display the maximum and minimum marks from the table students
5) To dsplay al details of students whose marks are between 80 to 95 inclusive
Ques- create a SQL query .....on
Table : STUDENT
Admno 101 , 102 , 103 , 104 & 105
Name
Ayushi
heena
Jitender
meena
Marks
52, 95 , 89 , 65 ,98
1) Write a create table query
2) To displey al details of all students.
3) To dsplay al details in descending order of marks.
4) To display admno and name of all students whose name starts with 'A.
4 To display the maximum and minimum marks from the table students
5) To display al details of students whose marks are between 80 to 95 inclusive
You have a VMware virtual machine on a ESX host with a production SQL database server. During a maintenance you cloned this virtual machine. Users started complaining that their saved work results in the database randomly disappear after they relog to the database, then sometimes appear back. Why does it happen?
Getting all the channel_ids that uploaded at least one video in "AI/ML" or "Robotics" technologies between 2018 and 2021.
Output Table:
channel_id
351
353
364
365
377We need to count the users who has the premium membership, but you are trying to sum instead of count(). And also in the WHERE clause, we need to check premium users have premium_membership value as 1 , and the value 0 is considered as non-premium user.
Get the number of male and female premium users in the platform.
gender total_users
F...
M...
18. Get the top 3 genre_ids that are liked by the users in India in the year 2018.
Note:
. Consider the name of the country as
"INDIA"
Consider reaction_type LIKE as liked. If a video belongs to 3 genres, then the like is counted in all the 3 genres.
• Sort the output in the descending order of no_of_likes, and then in the ascending order of the genre_id.
Expected Output Format
genre id
no of Likes