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;
Suggested Answer: C
Get Premium PGCES-02 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
37 comments · newest first
CO
Corrie
10 months ago
Not sure about this one, could be more than 5 rows too!
NG
Nguyet
11 months ago
Yeah, I agree with Sage, 3 sounds right.
DA
Dacia
11 months ago
Wait, how can it be 4 rows? That seems off.
TW
Twana
11 months ago
Definitely 2 rows!
SA
Sage
11 months ago
I think it returns 3 rows.
WA
Walton
12 months ago
I’m leaning towards option A, but I can't recall if DISTINCT ON counts all duplicates or just the first occurrence. This is tricky!
JU
Jutta
12 months ago
I feel like I might be overthinking this. If the sample table has 4 rows total and 2 of them are duplicates, maybe it returns 3?
PA
Paris
12 months ago
I remember practicing a question like this, and I think it was about counting unique rows. If there are 3 unique values, then it should return 3 rows, right?
CO
Corrina
1 year ago
I think the DISTINCT ON clause will return only unique values based on the "data" column, but I'm not sure how many unique values we have in the sample table.
SE
Selma
1 year ago
This is a good SQL question to test our understanding of the DISTINCT ON clause. I think I've got a handle on it, so I'll give it my best shot.
FR
Franchesca
1 year ago
I'm a bit confused by the DISTINCT ON syntax here. I'll need to review some examples to make sure I understand how it works before answering this.
MA
Marguerita
1 year ago
Okay, let me break this down step-by-step. The DISTINCT ON clause will return the first row for each unique value in the "data" column. So I just need to count the number of unique "data" values to get the answer.
BE
Bettina
1 year ago
Hmm, this looks like a tricky SQL question. I'll need to think through the DISTINCT ON clause carefully to figure out how many unique rows it will return.
AL
Alpha
1 year ago
Ah, the DISTINCT ON statement - a classic SQL gotcha. I'll need to carefully consider the data structure to determine the number of unique rows returned.
MA
Malissa
1 year ago
Okay, let me see here. I think the CMDB Use Case Modelar might be the right choice, since it's specifically focused on managing CIs and use cases. But I'm not 100% sure, so I'll need to double-check the details.
DE
Della
1 year ago
The key here is that we need to sign out users from the primary location, so I think the answer is going to be either A or B. I'll try to remember the differences between those two cmdlets.
JA
Janessa
1 year ago
This seems like a straightforward question about securing PDF reports. I think I'll go with option C - selecting the 'Secure this Report' option in the report properties.
IE
Iesha
1 year 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?
LE
Leonida
1 year ago
I'm going with 5 rows, it seems like the most logical choice.
CA
Cassie
1 year ago
I'm pretty sure it's 4 rows, not 2 or 3.
CL
Clorinda
1 year ago
I think it's actually 3 rows, not 2.
BE
Bea
1 year 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.
JE
Jeannetta
1 year ago
I'm not sure about 4 rows. I think it might be 3 rows because DISTINCT ON will return unique values.
CR
Craig
1 year ago
I agree with you. I also think it's 4 rows. The DISTINCT ON clause will eliminate duplicates.
KR
Kris
1 year ago
I think it's 4 rows. The DISTINCT ON clause will return unique values based on the 'data' column.
ED
Eden
1 year 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.
NO
Norah
1 year 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.
RO
Rossana
1 year ago
I think it might be 6 rows.
GL
Glory
1 year ago
I remember it being 2 rows.
AN
Andree
1 year ago
I'm pretty sure it's 3 rows.
AL
Allene
1 year ago
I think it's actually 4 rows.
QU
Quiana
1 year 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.
JE
Jesus
1 year ago
I think it might be C. 4 rows.
JE
Jesus
1 year ago
I agree, the answer is B. 3 rows.
JO
Joseph
1 year ago
I agree with Catalina, the answer is C) 4 rows. The DISTINCT ON clause will return unique values based on the specified column.
CA
Catalina
2 years ago
I disagree, I believe the answer is C) 4 rows because DISTINCT ON eliminates duplicates.
DA
Darrin
2 years ago
I think the answer is B) 3 rows.