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
2 months 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
2 months ago
I'm going with 5 rows, it seems like the most logical choice.
upvoted 0 times
...
Cassie
2 months ago
I'm pretty sure it's 4 rows, not 2 or 3.
upvoted 0 times
...
Clorinda
2 months ago
I think it's actually 3 rows, not 2.
upvoted 0 times
...
...
Bea
3 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
Jeannetta
1 months ago
I'm not sure about 4 rows. I think it might be 3 rows because DISTINCT ON will return unique values.
upvoted 0 times
...
Craig
1 months ago
I agree with you. I also think it's 4 rows. The DISTINCT ON clause will eliminate duplicates.
upvoted 0 times
...
Kris
1 months ago
I think it's 4 rows. The DISTINCT ON clause will return unique values based on the 'data' column.
upvoted 0 times
...
...
Eden
3 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
3 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
Rossana
1 months ago
I think it might be 6 rows.
upvoted 0 times
...
Glory
1 months ago
I remember it being 2 rows.
upvoted 0 times
...
Andree
2 months ago
I'm pretty sure it's 3 rows.
upvoted 0 times
...
Allene
3 months ago
I think it's actually 4 rows.
upvoted 0 times
...
...
Quiana
3 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
2 months ago
I think it might be C. 4 rows.
upvoted 0 times
...
Jesus
2 months ago
I agree, the answer is B. 3 rows.
upvoted 0 times
...
...
Joseph
3 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
3 months ago
I disagree, I believe the answer is C) 4 rows because DISTINCT ON eliminates duplicates.
upvoted 0 times
...
Darrin
3 months ago
I think the answer is B) 3 rows.
upvoted 0 times
...

Save Cancel