InfyTQ Previous Year DBMS Questions
You are here : Home >> InfyTQ Archive >> InfyTQ DBMS Questions
1. Consider three tables :
Query : Select empname FROM employee e WHERE e.empid IN (Select pd.empid FROM projectdetails pd INNER JOIN project p ON p.projectid = pd.projectid WHERE teamsize>10 GROUP BY pd.empid HAVINGCOUNT(DISTINCT domain) >= (SELECT MAX(COUNT(projectid)) FROM projectdetails GROUP BY empid));
What will be the output when the above query gets executed ?
a.
Jack
Jack
b.
Jane
John
c.
John
Jack
Jane
d.
Jack
2.
Query :
SELECT SUBSTR(customerid, 2) customerid, bi.bookid
FROM bookissue bi INNER JOIN book b ON bi.bookid = b.bookid
WHERE dateofissue >= ’21-Jan-2018′ AND LENGTH(bookname) > 9;
What will be the output when the above query is executed ?
a.
CUSTOMERID BOOKID
101 B978
103 B978
106 B978
105 B234
b.
CUSTOMERID BOOKID
101 B978
103 B978
106 B978
104 B567
c.
CUSTOMERID BOOKID
101 B978
103 B978
106 B978
104 B567
105 B234
d.
CUSTOMERID BOOKID
101 B978
103 B978
106 B978
can u please post answers too for the above dbms questions so that it will be useful for us…,
can u please post answers too for the above dbms questions so that it will be useful for us
2:
Answer: d
1: Option D