hii.....
i have two tables having one to many relationship that is bidirectional.
1. Event 2. Ticket
An event contains a list of tickets whereas an instance of ticket contains reference of that event. I am at Dao persistence level for event and want to fetch data from event on basis of maximum price of ticket. I have written sql query for that but i am unable to write criteria for that.
select e.name,t.name,max(t.price) as total from event as e join ticket as t on t.idEvent=e.id group by e.id order by total;
thanks for your help in advance......
|