Documente Academic
Documente Profesional
Documente Cultură
Write query
a) To insert the value in Student table.
b) To delete the value from Student table
c) To search student Name with roll_no >20.
d) To search Date_of_addmission which roll_no between 20 and 30.
e) To drop Table.
f) To change student name Akshay by Amar.
g) Alter the table.
=============================================================
==
Write query
a) to insert the value in Employee table.
b) to Delete the particular value from Employee table
c) to search Emp_name ,Address ,Date of joining which Emp_no
greater than 20.
d) to search Salary which Emp_no greater than20 but less than 30
e) to display all the field from a table.
f) to insert a new field in Employee table.
===============================================================
Write query
a) to insert the value in Department and
Employee table.
b) to Retrieve the name and address of all Employees who work on
research department.
c) to retrieve the dlocation where administration department is located.
Course (Course_no,Course_name)
Write Query
a) to insert command to insert the value in Student and
course table.
b) to retrive the name of all student whose roll_no less than 22.
c) to retrive the Student Name whose course name is cs.
d) to drop table.
===============================================================
Q5. Create table Employee, Department, DeptLocation, Works_on, and Project taking the
attributes given bellow.
Department (Dname,Dnumber,mgrno,mgrstartdate)
DeptLocations(Dnumber,DLocation)
Works_on(EENo,PNo,Hours)
Project(Pname,Pnumber,Plocation,Dnum)
Dependent(Eeno,Dependent_name,Sex,DOB,Relationship)
Department (Dname,Dnumber,mgrno,mgrstartdate)
DeptLocations(Dnumber,DLocation)
Works_on(EENo,PNo,Hours)
Project(Pname,Pnumber,Plocation,Dnum)
Dependent(Eeno,Dependent_name,Sex,DOB,Relationship)
Write query
1) Insert value in the above table.
2) Find the total sum of salary of all employees of the “Research” department, as
well as the maximum, minimum and average salary in this department.
3) Retrive the name of all employee who have no dependent.
4) Alter the “Employee” table by deleting the coloumn Supereno.
5) Retrive the Fname, Lname oaf all employee whose salary higher than average
salary.
Q8) Create table Employee, Department, DeptLocation, Works_on, and Project taking
the attributes given bellow.
Department (Dname,Dnumber,mgrno,mgrstartdate)
DeptLocations(Dnumber,DLocation)
Works_on(EENo,PNo,Hours)
Project(Pname,Pnumber,Plocation,Dnum)
Dependent(Eeno,Dependent_name,Sex,DOB,Relationship)
Write query
1) Insert value in the above table.
2) For each department retrieve the department number, the number of
employee in the department and their average salary.
3) For each department that has more than five employee retrieve the department
number of each employee who are making salary more than Rs 40,000.
4) Retrive the name of all employees who have two or more dependent.
5) Retrieve the employee number of all employees who works on project number
1,2,3.
Write query
1) Insert data in the above table.
2) List the name of all clients having ‘a’ as the second letter in their names.
3) Retrive the description and total Qty sold for each product.
4) List the order no. and date on which clients place their order.
5) Find product no. and description of non moving product (i.e product not being
sold)
Q10) Create Table
Write query
1) Insert data in the above table.
2) List all client who stay in ‘Bangalore’ or ‘Mumbai’.
3) Find the value of each product sold.
4) List the Product no. and description of constantly sold (i.e rapidly moving)
products.
5) Find the name and address for the customer who place order no. 9001.
Write query
1) Insert data in the above table.
2) List the clients who stay in a city whose First letter is ‘M’.
3) Find the names of clients who have purchased ‘Trouser’.
4) Find the name of client who have place of worth Rs 10000 or more.
5) Find the total order place by each customer.
Write query
1) Insert data in the above table.
2) Retrive the information from the Sales_oredr table for the order placed on 5th
September-2010.
3) Find the product and their quantities for the orders placed by client_no 1002
and 1003.
4) Find out if the product ‘T-Shirt’ has been order by any client and print the
Client no. and name to whome it was sold.
5) List product whose selling price greater than 500 and less than or equal to 700.
Write query
1) Insert data in the above table.
2) Calculate the average Qty sold for each client that has maximum order value of
Rs 150000.
3) List the product and order from customer who have order less than 5 unit of
‘Jeans’.
4) Find the value of each product sold.
5) Find total sale price for all product sold.
Write query
1) Insert value in the above table.
2) Retrive the title, author, and publisher names of all books published in 1999
and 2006.
3) Retrive the title of the book whose author is ‘A Tanenbum’.
4) Get the details of all books whose price is greater than the average price of
the books.
5) Get the names of all the books for which an order has been placed.
Q15) Create table
Write query
1) Insert value in the above table.
2) Get the title and price of all the books whose price is less than the average
price of the books.
3) Get the names of all authors who have more than two books in the catalog.
4) Get the details of the authors whose books are being sold form the book club.
5) Get the title and price of all books whose price is greater than the maximum
of the category average.
COMPILER
Q1) Write a program to reorganize data type as ‘integer’, ‘float’ and ‘exponent’.
Q2) Write a program to reorganize a DFA as b*abb.
Q3) Write a program to represent a simple one pass compiler.
Q4) Write a lex program to generate token.
Q5) Write an YACC using C for a simple calculator.