Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Could You please Help me with the Below Requirement
I have Table Like Below
ID | A | B | |
010G1104909000520001 | 0001 | 20210104152123 | |
010G1104909000520002 | 0002 | 20210104152123 | |
010G1104909000520003 | 0003 | 20210104152123 | |
010G1104909000520004 | 0004 | 20210104152123 | |
010G1104909000520009 | 0009 | 20210104152123 | |
010G1104909000520010 | 0010 | 20210104152123 | |
010G1104909000520011 | 0011 | 20210202121138 | |
010G1104909000520012 | 0012 | 20210202121138 | |
010G1104909000520013 | 0013 | 20210202121138 | |
010G1104909000520014 | 0014 | 20210202121138 | |
010G1104909000520020 | 0020 | 20210202121138 |
Need To load only max of each group
Output
ID | A | B | |
010G1104909000520010 | 0010 | 20210104152123 | |
010G1104909000520020 | 0020 | 20210202121138 |
Thanks and regards
s
Try this,
tab1:
LOAD * INLINE [
ID, A, B,
010G1104909000520001, 0001, 20210104152123,
010G1104909000520002, 0002, 20210104152123,
010G1104909000520003, 0003, 20210104152123,
010G1104909000520004, 0004, 20210104152123,
010G1104909000520009, 0009, 20210104152123,
010G1104909000520010, 0010, 20210104152123,
010G1104909000520011, 0011, 20210202121138,
010G1104909000520012, 0012, 20210202121138,
010G1104909000520013, 0013, 20210202121138,
010G1104909000520014, 0014, 20210202121138,
010G1104909000520020, 0020, 20210202121138,
];
Right Join(tab1)
LOAD MaxString(ID) As ID, Max(A) As A, B
Resident tab1
Group By B;
Try this,
tab1:
LOAD * INLINE [
ID, A, B,
010G1104909000520001, 0001, 20210104152123,
010G1104909000520002, 0002, 20210104152123,
010G1104909000520003, 0003, 20210104152123,
010G1104909000520004, 0004, 20210104152123,
010G1104909000520009, 0009, 20210104152123,
010G1104909000520010, 0010, 20210104152123,
010G1104909000520011, 0011, 20210202121138,
010G1104909000520012, 0012, 20210202121138,
010G1104909000520013, 0013, 20210202121138,
010G1104909000520014, 0014, 20210202121138,
010G1104909000520020, 0020, 20210202121138,
];
Right Join(tab1)
LOAD MaxString(ID) As ID, Max(A) As A, B
Resident tab1
Group By B;
Output: