Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
it works with ALLOW FILTERING, but I dont want to use that.How do I get max value of a row when value is not in primary key?

What I have tried:

stmt = session.prepare("Select *, max(price) from clothing_sales where tag = 123 and price=?)



this just gives me the first row.
Posted
Comments
Member 8428760 10-Oct-22 16:57pm    
select t.tag, max(t.price) from (select * from clothing_sales where tag = 123) t

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900