Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
| fielda | fieldb | fieldc | fieldD |
| 2 | abc | 2 | 123 |
| 2 | abc | 2 | 456 |
| 2 | dfg | 3 | 123 |
| 2 | dfg | ||
| 2 | hij | 4 | 123 |
| 2 | hij | 4 | 456 |
| 2 | klm | 5 | 123 |
| 2 | klm | 5 | 456 |
| 2 | nop | 7 | 123 |
| 2 | nop | 7 | 456 |
output shud be :
| 2 | abc | 2 | 123 |
| 2 | hij | 4 | 123 |
| 2 | klm | 5 | 123 |
| 2 | nop | 7 | 123 |
May be load with DISTINCT keyword
LOAD Distinct
fielda,
fieldb,
fieldc
FROM ....
taking only distinct will not work.
What is the condition for "fieldD"?
- Marcus
I have some questions about your model. Is this a single flat table? Is the duplication in the data or being caused by the association?
Do you want the max value of fieldc?
it is just the single table now,
kindly help with the resolution
duplicacy should be removed from field b
i want sum of fieldc
try this
Data:
LOAD Distinct
fielda,
fieldb,
fieldc,
fieldd
FROM ...
Final
LOAD
fielda,
fieldb,
fieldc,
min(fieldd) as fieldd
resident Data
group by fielda,fieldb,fieldc;
drop table Data;