Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have table
| ID | Country |
| 1 | AUS |
| 2 | AUS |
| 3 | AUS |
| 4 | IND |
| 5 | IND |
| 6 | US |
| 7 | UK |
| 8 | Japan |
| 9 | AUS |
| 10 | IND |
How to find the country wise >2 id's of country
AUS 4
IND 3
US 1
UK 1
Japan 1
Required out put is :
getting only AUS and IND data in script side, Remaining data remove , How will do.
Thanks Advance
Ram
test:
load * Inline [
ID,Country
1,AUS
2,AUS
3,AUS
4,IND
5,IND
6,US
7,UK
8,Japan
9,AUS
10,IND
];
NoConcatenate
LOAD * Where Cnt>2;
LOAD Country,count(Country) as Cnt Resident test group by Country;
DROP Table test;
hi
try this
[Table]:
load *,
'1' as CountID;
LOAD * INLINE
[
ID,Country
1,AUS
2,AUS
3,AUS
4,IND
5,IND
6,US
7,UK
8,Japan
9,AUS
10,IND
](delimiter is ',');
final:
load * where CountID >=2;
Load
sum( CountID) as CountID ,
Country
Resident Table group by Country ;
drop table Table;
Hi Anat,
Here Id is the EMP Id , We need Id also.
Country ID
AUS 1
AUS 2
AUS 3
AUS 9
IND 4
IND 5
IND 10
This is out put required
Thanks advance
Ram
LOAD * INLINE
[
ID,Country
1,AUS
2,AUS
3,AUS
4,IND
5,IND
6,US
7,UK
8,Japan
9,AUS
10,IND
](delimiter is ',');
final:
load * where CountID >=2;
Load
sum( CountID) as CountID ,
Country
Resident Table group by Country ;
Hi Anat ,
We have other columns also there, we have emp details table.
requirement is country wise more than two employees are there , we need that information.
Id Country Name Joindate Hike% ...
Thanks advance.
Ram