Infosys Certified PostgreSQL Associate
Practice with real exam-pattern questions for Infosys Certified PostgreSQL Associate. Each question includes a detailed explanation to help you understand the concept, not just memorise the answer. Try 10 questions free — no login required.
Full question bank for this exam + 1,357+ others. Cancel anytime.
Join Premium10 Infosys Certified PostgreSQL Associate practice questions with answers
Real Lex exam-pattern multiple-choice questions for the Infosys Certified PostgreSQL Associate certification. Each question includes the correct answer. The full question bank is available to Premium members.
- Question 1
Consider the structure of three table department, computer and employee as shown below. John, a database admin would like to remove all three tables from database as they no longer are being used. Identify the correct commands.
department:
Column Name Data Type/Size Description Constraints dept_id integer Department id primary key dept_name varchar (30) Department name not null computer:
Column Name Data Type/Size Description Constraints comp_id integer Computer id primary key comp_make varchar (30) Computer make not null employee:
Column Name Data Type/Size Description Constraints emp_id integer Employee id primary key emp_name Varchar (30) Employee name not null comp_id integer Computer id Foreign key referring to comp_id column of computer table dept_id varchar (30) Department id Foreign key referring to dept_id column of department table - ✓
DROP table department;
DROP table computer;
DROP table employee;
Correct - B
DROP table department CASCADE;
DROP table computer;
DROP table employee;
- C
DROP table department CASCADE;
DROP table computer CASCADE;
DROP table employee;
- D
DROP table employee;
DROP table department;
DROP table computer;
- ✓
- Question 2
Identify the TRUE statement about NULL and Empty value.
I) A table column cannot store Empty value however it can store NULL value
II) NULL represents the absence of a value which means no value
III) Empty represents the value that is does not have any meaningful data stored in it.
IV) NULL is not allocated memory however Empty is allocated memory which does not have any value stored in it.
- ✓
I) II) II)
Correct - B
II) III) IV)
- C
I) III) IV)
- D
I) II) IV)
- ✓
- Question 3
Tom, a database admin has written below query on employee table as per business requirement. What would be the output?
employee:
Column Name Data Type/Size Description Constraints emp_id integer Employee id primary key emp_name varchar (30) Employee name not null emp_doj date Employee date of joining not null emp_salary integer Employee salary not null dept_id integer Department id not null Query:
SELECT dept_id, emp_doj, SUM (emp_salary) FROM employee GROUP BY ROLLUP (dept_id, emp_doj);
- ✓
It will calculate department wise total salary as well as department and date of joining wise total salary. It also calculates grand total salary of all the employees irrespective of departments they work in.
Correct - B
It will calculate department wise total salary as well as department and date of joining wise total salary.
- C
It will calculate department wise total salary and grand total salary of all the employees irrespective of departments they work in.
- D
It will calculate only grand total salary of all employees irrespective of departments they work in.
- ✓
- Question 4
Consider two tables stream_details and trainer_details.
stream_details:
stream_id | stream_name
--------------+-------------
101 | Open source
102 | Java
103 | Microsoft
104 | Testing
trainer_details:
trainer_id | trainer_name | trainer_salary | stream_id
--------------+--------------------+--------------------+---------
1 | John | 60000 | 101
2 | Peter | 80000 | null
3 | Mike | 90000 | 103
4 | Henry | 70000 | null
Phil, a database admin has executed below query as per business requirement. What would be the output?
SELECT stream_id, stream_name FROM stream_details S WHERE EXISTS (SELECT * FROM trainer_details T WHERE T. stream_id = S. stream_id);
- ✓
stream_id | stream_name
--------------+-------------
101 | Open source
103 | Microsoft
Correct - B
stream_id | stream_name
--------------+-------------
101 | Open source
- C
stream_id | stream_name
--------------+-------------
102 | Java
104 | Testing
- D
Error
- ✓
- Question 5
Consider the table employee with below data,
employee:
emp_id | emp_name | emp_salary | emp_designation
-----------+----------------+------------------+-----------------
1001 | John | 50000 | PM
1002 | Peter | 30000 | SE
1003 | Mike | 55000 | PM
1004 | Henry | 40000 | SE
Mark, a database admin has executed below transaction on employee table.
BEGIN;
delete from employee where emp_id=1001;
Update employee set emp_salary = emp_salary+1000 where emp_name = 'Peter';
ROLLBACK;
END;
What will be change to database system after executing above transaction?
NOTE: AUTOCOMMIT is ON
- ✓
It will execute the delete and update queries, save the changes permanently to the database system and ROLLBACK command does not have any impact.
Correct - B
It will execute the delete and update queries, then save the changes temporarily in the buffer memory and ROLLBACK command will reverse the operations to bring it back to previous state.
- C
Transaction will not execute as delete query is wrong
- D
Transaction will not execute as update query is wrong
- ✓
- Question 6
Rose would like to display names of students whose average marks is greater than 79. She had come up with the below query which has some errors. Help her to modify the query which will give the expected output.
select student_name from students having marks > 79;
students:
student_name | course_name | marks
---------------------+--------------------+-------
Ben | Mathematics | 90
Jack | English | 75
Ben | English | 70
Jack | Mathematics | 65
Kelly | Mathematics | 80
Excepted output:
student_name
--------------------
Ben
Kelly
- ✓
Select student_name from students group by(student_name) having average(marks)>79;
Correct - B
Select student_name from students where avg(marks)>79;
- C
Select student_name from students group by(student_name) having avg(marks)>79;
- D
Select student_name from students where average(marks)>79;
- ✓
- Question 7
Consider the table schema.
Student (Student_id,student_name ,dept_id)
Department(dept_id,dept_name)
Which of the following query would display names of the students who are studying in same department as mike?
- ✓
Select s1.student_name from student s1 inner join student s2 on s1.dept_id=s2.dept_id and s1.student_name='mike' where s1.student_name<>'mike';
Correct - B
Select s1.student_name from student s1 inner join student s2 on s1.dept_id=s2.dept_id and s2.student_name='mike' where s1.student_name<>'mike';
- ✓
- Question 8
Consider the table recover with below data.
recover:
rid | size | data
-----+-----------+-----------
1 | 20 GB | Ram data
2 | 20 GB | Hard disk
3 | 120 GB | Hard disk
4 | 20 GB | Ram Data
5 | 20 GB | Hard disk
Match the following query with the output given below.
Queries:
i) select distinct(size), data from recover;
ii) select size,data from recover where data like '%d%';
iii) select distinct on(size)size,data from recover;
Output:
a. size | data
---------+-----------
20 GB | Ram data
20 GB | Hard disk
120 GB | Hard disk
20 GB | Hard disk
b. size | data
--------+-----------
120 GB | Hard disk
20 GB | Ram data
c. size | data
--------+-----------
20 GB | Ram data
20 GB | Hard disk
20 GB | Ram Data
120 GB | Hard disk
- ✓
i) -> a, ii) -> b, iii) ->c
Correct - B
i) -> c, ii) -> a, iii) ->b
- C
i) -> b, ii) -> a, iii) ->c
- D
i) -> c, ii) -> b, iii) ->a
- ✓
- Question 9
Consider the table demo with below data.
demo:
col1 | col2 | col3
------+------+------
1 | 10 | 100
2 | 20 | 200
3 | 30 | 300
After executing below query what would be the data present in demo table?
Note: AUTOCOMMIT is ON.
BEGIN;
Insert into demo values(4,40,400);
update demo set col2=55 where col1=2;
delete from table demo where col1=4;
END;
- ✓
col1 | col2 | col3
------+------+------
1 | 10 | 100
2 | 55 | 200
3 | 30 | 300
4 | 40 | 400
Correct - B
col1 | col2 | col3
------+------+------
1 | 10 | 100
2 | 55 | 200
3 | 30 | 300
- C
col1 | col2 | col3
------+------+------
1 | 10 | 100
2 | 20 | 200
3 | 30 | 300
4 | 40 | 400
- D
col1 | col2 | col3
------+------+------
1 | 10 | 100
2 | 20 | 200
3 | 30 | 300
- ✓
- Question 10
Consider two tables employee and department. Identify proper types of Join to be used for given scenarios.
Scenarios a. The management would like to know the names of employees and their associated departments. b. The management would like to retrieve all employee and department names irrespective of the department they are associated with. c. The management would like to get a report that displays employee and their corresponding manager details. - ✓
a. => self join
b. => right join
c. => self join
Correct - B
a. => inner join
b. => left join
c. => self join
- C
a. => inner join
b. => right join
c. => self join
- D
a. => inner join
b. => inner join
c. => self join
- ✓
More in Open Source
Infosys Certified Elasticsearch Developer
Infosys Certified PHP Associate
Infosys Certified L1 Junior Open Source Programmer
Pay once. Clear every cert this year.
One subscription, full Telegram channel access, every PDF posted during your membership.
- Full access to all 1,357+ certifications
- Monthly updated question banks
- Telegram private channel access
- Cancel anytime
- Everything in Monthly
- Save ₹2,100 vs monthly billing
- Priority answer key requests
- Best for increasing DQ score fast
- Everything in Quarterly
- Lifetime channel access — no renewals
- All future certifications included
- Priority response from admin team
Common questions, straight answers.
A monthly-updated Telegram channel where we post real exam-pattern question banks and detailed answer keys for 1,357+ Infosys Lex certifications. You join once, you get every PDF posted during your membership.
Right after payment on our Graphy page, you'll receive a private invite link to the Telegram channel. Access is instant — usually under 30 seconds.
We compile question banks from the actual Lex test pattern, sourced and verified by 180K+ community members who've recently cleared these exams. Match rate is consistently 85–95%.
Every single month. When Infosys rolls out new versions of certifications, we post updated dumps within 7–10 days. You'll see channel activity weekly.
Clearing certifications is one of the highest-weighted DQ factors. Members typically clear 3–5 certifications in their first 3 months, which moves DQ scores up by a full band.