All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: About Question enthuware.oce-jpad.v6.2.490 :
PostPosted: Sun Jul 16, 2017 7:37 am 
Offline

Joined: Mon Apr 18, 2016 2:05 pm
Posts: 9
The explanation to option 4 is wrong. COUNT(), MIN() and MAX() can be used without a GROUP BY clause. But they can only be used in side a select clause.

For example this is valid:

SELECT COUNT(o)
FROM Order o

cheers


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.oce-jpad.v6.2.490 :
PostPosted: Sun Jul 16, 2017 7:46 pm 
Offline

Joined: Fri Nov 29, 2013 8:26 pm
Posts: 358
Hi, Supafly,
Which test and which question no. this question belongs?
But this is not valid:
Select o.id, count(o) from Order o because group by clause does not exist.
When there are more than one path in the select clause with aggregate functions (count, max, min....), the group by clause is needed.


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.oce-jpad.v6.2.490 :
PostPosted: Sun Jul 16, 2017 10:12 pm 
Online
Site Admin

Joined: Fri Sep 10, 2010 9:26 pm
Posts: 7093
The explanation doesn't say that you cannot use count without group by at all. It says you cannot mix grouped columns and non-grouped columns without a group by.

This explanation is in context of the option 5:
select s.firstname, count(p) from Student s left join s.presentations p

Here, you cannot mix s.firstname and count(p) without a group by for firstname.

Himai, this is in test 3, q 47. But you can simply open the question by doing control+q and entering 2.490 in ETS Viewer.

HTH,
Paul.


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.oce-jpad.v6.2.490 :
PostPosted: Mon Jul 17, 2017 12:51 am 
Offline

Joined: Mon Apr 18, 2016 2:05 pm
Posts: 9
That is true, i misread the explanation.


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.oce-jpad.v6.2.490 :
PostPosted: Sat Dec 16, 2017 4:09 am 
Offline

Joined: Tue Jul 04, 2017 4:00 am
Posts: 2
Looks like logical contradiction. I think answer 1 is also correct. Because we are not having multiple students with same name therefore with or without grouping we get the same result.


Attachments:
duplicate_vs_unique.png
duplicate_vs_unique.png [ 69.2 KiB | Viewed 965 times ]
Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.oce-jpad.v6.2.490 :
PostPosted: Sat Dec 16, 2017 10:24 pm 
Online
Site Admin

Joined: Fri Sep 10, 2010 9:26 pm
Posts: 7093
No, it is not contradictory. "First names are unique" implies that no two students have same first name. Duplicate rows in the results will be there if same student make multiple presentations.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL/ThatBigForum