Posts

Showing posts from November, 2022

Stack

Image
  Aim: Write a program, with separate user defined functions to perform the following operations: ·         Push the keys (name of the student) of the dictionary into a stack, where the corresponding value (marks) is greater than 75. ·         Pop and display the content of the stack.

Queris set DDL Commands, Based on two tables, Group by order by

Image
  Queries Set 3 (DDL Commands) Suppose your school management has decided to conduct cricket matches between students of Class XI and Class XII. Students of each class are asked to join any one of the four teams – Team Tehlka, Team Toofan, Team Aandhi and Team Shailab. During summer vacations, various matches will be conducted between these teams. Help your sports teacher to do the following: a)   Create a database “Sports”. b)   Create a table “TEAM” with following considerations: i)    It should have a column TeamID for storing an integer value between 1 to 9, which refers to unique identification of a team. ii)     Each TeamID should have its associated name (TeamName), which should be a string of length not less than 10 characters. iii)    Using table level constraint, make TeamID as the primary key. ...

MySql queries

Image
  PART B – SQL QUERIES 1.   Queries   PART B – SQL QUERIES 1.   Queries Set 1 (Database Fetching records) Consider the following MOVIE table and write the SQL queries based on it.     a)   Display all information from movie.     b)   Display the type of movies. c)    Display movieid, moviename, total_earning by showing the business done by the movies. Calculate total_earning using the sum of productioncost and businesscost.     d)       Display movieid, moviename and productioncost for all movies with productioncost greater than 150000 and less than 1000000.   e)    Display the movie of type action and romance. ...