Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

PostgreSQL Exam PGCES-02 Topic 8 Question 57 Discussion

Actual exam question for PostgreSQL's PGCES-02 exam
Question #: 57
Topic #: 8
[All PGCES-02 Questions]

The "sample" table consists of the following data: How many rows are returned by executing the following SQL statement? SELECT DISTINCT ON (data) * FROM sample;

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Iesha
27 days ago
This question is making my head spin! I'm going to go with my gut and choose A. 2 rows. Gotta love those tricky SQL queries, am I right?
upvoted 0 times
Leonida
1 days ago
I'm going with 5 rows, it seems like the most logical choice.
upvoted 0 times
...
Cassie
19 days ago
I'm pretty sure it's 4 rows, not 2 or 3.
upvoted 0 times
...
Clorinda
20 days ago
I think it's actually 3 rows, not 2.
upvoted 0 times
...
...
Bea
1 months ago
E) 6 rows? Really? That can't be right. I'm sticking with B. 3 rows. It's the most logical answer based on the DISTINCT ON clause.
upvoted 0 times
...
Eden
1 months ago
Haha, this question is a classic SQL brain-teaser! I'm going with C. 4 rows. Let's see if I can outsmart the exam writers.
upvoted 0 times
...
Norah
1 months ago
Oh, I was sure it was D. 5 rows. But now I'm not so sure. I need to review my SQL basics again.
upvoted 0 times
Andree
19 days ago
I'm pretty sure it's 3 rows.
upvoted 0 times
...
Allene
1 months ago
I think it's actually 4 rows.
upvoted 0 times
...
...
Quiana
2 months ago
I think the correct answer is B. 3 rows. The DISTINCT ON clause will return the first row for each distinct value of the 'data' column.
upvoted 0 times
Jesus
9 days ago
I think it might be C. 4 rows.
upvoted 0 times
...
Jesus
20 days ago
I agree, the answer is B. 3 rows.
upvoted 0 times
...
...
Joseph
2 months ago
I agree with Catalina, the answer is C) 4 rows. The DISTINCT ON clause will return unique values based on the specified column.
upvoted 0 times
...
Catalina
2 months ago
I disagree, I believe the answer is C) 4 rows because DISTINCT ON eliminates duplicates.
upvoted 0 times
...
Darrin
2 months ago
I think the answer is B) 3 rows.
upvoted 0 times
...

Save Cancel