scct | Scala Code Coverage Tool
kandi X-RAY | scct Summary
kandi X-RAY | scct Summary
Scala Code Coverage Tool
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of scct
scct Key Features
scct Examples and Code Snippets
Community Discussions
Trending Discussions on scct
QUESTION
My table is:
id student_id exam_date license result 1 101 01-11-2020 B2 FAILED 2 102 15-11-2020 A PASSED 3 103 22-11-2020 D FAILED 4 101 01-10-2020 D PASSED 5 104 01-12-2020 A PASSED 6 103 29-11-2020 D PASSED 7 101 01-12-2020 B2 PASSED 8 105 01-09-2020 B2 FAILED 9 104 01-11-2020 A FAILED 10 105 01-11-2020 B2 PASSEDI need to select the results that would have the first result according to the exam date according to each student id and the license column. If the same student takes different license exam, these two results need to come up as well. But I need only one result row for each student id and license value.
The result should look like this:
id student_id exam_date license result 1 101 01-11-2020 B2 FAILED 2 102 15-11-2020 A PASSED 3 103 22-11-2020 D FAILED 4 101 01-10-2020 D PASSED 8 105 01-09-2020 B2 FAILED 9 104 01-11-2020 A FAILEDI've done the research and queries and so far I only got 1 row for student_id although the student takes two different license examination.
The following is my query:
...ANSWER
Answered 2020-Dec-13 at 08:40Thinking that you are grouping by student_id in this case is almost incorrect in this case. What are actually grouping by is student + license. Let's call this key combination individual_license
.
Here's what the solution will look like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install scct
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page