qvqfqlik
Creator
2019-02-06
07:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Help with max value
hi,
please I need help with getting the record with max value "cycle" number for the combination of ID, name in the below sample data.
ID | name | cycle | number | place | dept | country |
12 | a | 1 | n1 | place1 | dept1 | c1 |
12 | a | 2 | n1 | place2 | dept2 | c2 |
13 | a | 1 | n2 | place1 | dept2 | c1 |
13 | a | 2 | n2 | place2 | dept2 | c2 |
13 | a | 3 | n2 | place3 | dept3 | c4 |
14 | a | 1 | n3 | place4 | dept1 | c5 |
Required output
number | place | dept | country |
n1 | place2 | dept2 | c2 |
n2 | place3 | dept3 | c4 |
n3 | place4 | dept1 | c5 |
1,002 Views
1 Solution
Accepted Solutions
sunny_talwar
MVP
2019-02-06
08:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Script based
Table: LOAD * INLINE [ ID, name, cycle, number, place, dept, country 12, a, 1, n1, place1, dept1, c1 12, a, 2, n1, place2, dept2, c2 13, a, 1, n2, place1, dept2, c1 13, a, 2, n2, place2, dept2, c2 13, a, 3, n2, place3, dept3, c4 14, a, 1, n3, place4, dept1, c5 ]; Right Join (Table) LOAD number, Max(cycle) as cycle Resident Table Group By number;
Will remove three of the unwanted rows from the database
975 Views
4 Replies
sunny_talwar
MVP
2019-02-06
07:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to do this in the script or a front end chart?
999 Views
qvqfqlik
Creator
2019-02-06
07:48 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
anything works Sunny.
can you please give solution for both. Thankyou
991 Views
sunny_talwar
MVP
2019-02-06
08:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Script based
Table: LOAD * INLINE [ ID, name, cycle, number, place, dept, country 12, a, 1, n1, place1, dept1, c1 12, a, 2, n1, place2, dept2, c2 13, a, 1, n2, place1, dept2, c1 13, a, 2, n2, place2, dept2, c2 13, a, 3, n2, place3, dept3, c4 14, a, 1, n3, place4, dept1, c5 ]; Right Join (Table) LOAD number, Max(cycle) as cycle Resident Table Group By number;
Will remove three of the unwanted rows from the database
976 Views
qvqfqlik
Creator
2019-02-09
08:34 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thankyou Sunny
937 Views