Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I have 3 columns say: Item1 , Item2 , Item3. Now i have to count their numbers by writing SqlQueries.
In expression i have used Count(Item1Id), COunt(Item2Id) , Count(Item3Id).
In Script window how can i write the same in Sql query form?? Because if i write:
SQL Select count(Item1ID) from abc ; but what do i write in LOAD statement above it??
tHanks
LOAD 'Item1' As Item, NCount;
SQL SQL Select count(Item1ID) As NCount from abc;
one SQL too many
Hey Thankx but i have to select all coulmns and have to count as well.
Can i write:
SQL Select * , Cout(Item1) As NCount from abc;
LOAD *; SQL SELECT...
😉
LOL, You know Ioannis, as always... two better than one! XD (Just joking!)
will not work unless you specify a group by clause as well
I do not believe you can as Count is a Aggragation function:
However you can do the following:
Temp:
Select
Item1 ,
Item1id,
Item2 ,
Item2id
From abc;
Count:
Load
Item1 ,
Count(Item1id)
Resident Temp
Group by Item1;
Regards
RL
Which database are you using?
SQL Select * , Count(Item1) Over() As NCount from abc;
Or
SQL Select * , (Select Count(Item1) From abc) As NCount from abc;
Hey,
It is giving me error