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 1 Question 42 Discussion

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

The "animal" table consists of the following data: Select the correct result returned by executing the following SQL statement: SELECT name FROM animal ORDER BY weight DESC LIMIT 2 OFFSET 1;

Show Suggested Answer Hide Answer
Suggested Answer: A, D

Contribute your Thoughts:

Lashawna
2 months ago
I got this one. The query looks good to me. Though, I hope the 'animal' table doesn't have any bodybuilding champs, or this could get interesting.
upvoted 0 times
Frederick
1 months ago
Let's hope there are no weightlifting animals in the table!
upvoted 0 times
...
Luis
1 months ago
I agree, it should skip the heaviest and return the next two in descending weight order.
upvoted 0 times
...
Marguerita
1 months ago
I think it will return the second heaviest animal's name.
upvoted 0 times
...
...
Daren
3 months ago
Nah, man, this is totally wrong. A syntax error? Come on, this is basic SQL stuff. I bet the person who wrote this question is a llama in disguise.
upvoted 0 times
France
28 days ago
Exactly, no syntax error here. Just a simple SQL query.
upvoted 0 times
...
Josefa
1 months ago
So, the first result would be the heaviest animal, and the second result would be the next heaviest one.
upvoted 0 times
...
Maira
1 months ago
Yeah, the query is ordering by weight in descending order and skipping the first result.
upvoted 0 times
...
Audrie
1 months ago
I think the correct result would be the second heaviest animal's name.
upvoted 0 times
...
Magdalene
1 months ago
Definitely not a syntax error, just a matter of understanding the SQL query.
upvoted 0 times
...
Tresa
2 months ago
So, the correct result would be the name of the second heaviest animal in the table.
upvoted 0 times
...
Deeanna
2 months ago
Yeah, the SQL statement is ordering the animals by weight in descending order and then skipping the first result and returning the next two.
upvoted 0 times
...
Fredric
3 months ago
I think the correct result would be the name of the second heaviest animal in descending order.
upvoted 0 times
...
...
Minna
3 months ago
Hold on, isn't OFFSET 1 going to skip the first record? I think this query will return the third and fourth heaviest animals instead.
upvoted 0 times
Maira
2 months ago
That makes sense. So the query will return the names of the second and third heaviest animals in descending order of weight.
upvoted 0 times
...
Stephanie
2 months ago
Yes, you are correct. The OFFSET 1 will skip the first record, so it will return the third and fourth heaviest animals.
upvoted 0 times
...
...
Lashunda
3 months ago
I'm pretty sure the query is valid. It should return the second and third heaviest animals in the 'animal' table, ordered by weight in descending order.
upvoted 0 times
...
Franklyn
3 months ago
I'm not sure, but I think the SQL statement will return the name of the heaviest animal.
upvoted 0 times
...
Sherman
3 months ago
I agree with German, the SQL statement will return the name of the second heaviest animal.
upvoted 0 times
...
German
4 months ago
I think the correct result will be the name of the second heaviest animal.
upvoted 0 times
...

Save Cancel