dotnetrockz Posted September 8, 2014 Report Posted September 8, 2014 example data is date column is in varchar here transactiondate Category 08/15/2014 economy 08/16/2014 bussiness 08/15/2014 bussiness 08/17/2014 compact 08/16/2014 bussiness 08/15/2014 economy the result i want to see is 08/15/2014 economy 2 08/15/2014 bussiness 1 08/16/2014 bussiness 2 08/17/2014 compact 1 iam trying like this but its not working SELECT TRANSACTIONDATE, CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY TRANSACTIONDATE, CATEGORY
ZuniorVentiyar Posted September 8, 2014 Report Posted September 8, 2014 SELECT CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY CATEGORY ---idhi try chesi results vosthundoo chudu mayaa oka sari (TRANSACTIONDATE thesesaa) ... nuvvu rasindhi aithy correct ee but just trying other way
ARYA Posted September 8, 2014 Report Posted September 8, 2014 you dont need to do multiple baa...just try this you will get your result! SELECT TRANSACTIONDATE, CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY TRANSACTIONDATE
ZuniorVentiyar Posted September 8, 2014 Report Posted September 8, 2014 select clause lo unnavu group by clause lo lekuntee SQL thanthundhi kadha ARYA bhayaaa you dont need to do multiple baa...just try this you will get your result! SELECT TRANSACTIONDATE, CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY TRANSACTIONDATE
dotnetrockz Posted September 8, 2014 Author Report Posted September 8, 2014 select clause lo unnavu group by clause lo lekuntee SQL thanthundhi kadha ARYA bhayaaa you dont need to do multiple baa...just try this you will get your result! SELECT TRANSACTIONDATE, CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY TRANSACTIONDATE SELECT CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY CATEGORY ---idhi try chesi results vosthundoo chudu mayaa oka sari (TRANSACTIONDATE thesesaa) ... nuvvu rasindhi aithy correct ee but just trying other way CORRECT ADHI ALREADY TRY CHESANU....ala chesthe its grouping correctly according to category kaani naku ikkada perday/per category/count kavali
ParmQ Posted September 8, 2014 Report Posted September 8, 2014 example data is date column is in varchar here transactiondate Category 08/15/2014 economy 08/16/2014 bussiness 08/15/2014 bussiness 08/17/2014 compact 08/16/2014 bussiness 08/15/2014 economy the result i want to see is 08/15/2014 economy 2 08/15/2014 bussiness 1 08/16/2014 bussiness 2 08/17/2014 compact 1 iam trying like this but its not working SELECT TRANSACTIONDATE, CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY TRANSACTIONDATE, CATEGORY Baa, use partition by clause over Rank or row number.
dotnetrockz Posted September 8, 2014 Author Report Posted September 8, 2014 Baa, use partition by clause over Rank or row number. i thought this is to delete duplicate rows...group by ela use avuthundhi?
Silver_mani Posted September 8, 2014 Report Posted September 8, 2014 SELECT TRANSACTIONDATE, CATEGORY, COUNT(*) FROM TABLE GROUP BY TRANSACTIONDATE, CATEGORY
ZuniorVentiyar Posted September 8, 2014 Report Posted September 8, 2014 :4_12_13: :4_12_13: ... yes this should work , count(*) ,... SELECT TRANSACTIONDATE, CATEGORY, COUNT(*) FROM TABLE GROUP BY TRANSACTIONDATE, CATEGORY
ParmQ Posted September 8, 2014 Report Posted September 8, 2014 i thought this is to delete duplicate rows...group by ela use avuthundhi? Wait, I read your question wrong. Thats your qury. SELECT TRANSACTIONDATE, CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY TRANSACTIONDATE, CATEGORY You are using the Category in the group by clause. Remove the category in the Group by clause and try.
Silver_mani Posted September 8, 2014 Report Posted September 8, 2014 :4_12_13: :4_12_13: ... yes this should work , count(*) ,... idi work cheyakapothe nenu inka db ki raanu :police:
ARYA Posted September 8, 2014 Report Posted September 8, 2014 Wait, I read your question wrong. Thats your qury. SELECT TRANSACTIONDATE, CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY TRANSACTIONDATE, CATEGORY You are using the Category in the group by clause. Remove the category in the Group by clause and try. nenu ade seppanu...
pythonic Posted September 8, 2014 Report Posted September 8, 2014 SELECT TRANSACTIONDATE, CATEGORY, COUNT(*) FROM TABLE GROUP BY TRANSACTIONDATE, CATEGORY Nee output ki edhe correct...
dotnetrockz Posted September 8, 2014 Author Report Posted September 8, 2014 Wait, I read your question wrong. Thats your qury. SELECT TRANSACTIONDATE, CATEGORY, COUNT(CATEGORY) FROM TABLE GROUP BY TRANSACTIONDATE, CATEGORY You are using the Category in the group by clause. Remove the category in the Group by clause and try. select clause lo unnavu group by clause lo lekuntee SQL thanthundhi kadha ARYA bhayaaa
Recommended Posts