Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
pritesh1908
Starting Member
4 Posts |
Posted - 2012-04-25 : 20:57:08
|
| i am trying to write a query that would do the following on the view update_winnerlist which is already GROUPed BY item_indexSELECT email_id(SELECT email_id,min(bid_amount)FROM update_winnerslist AS a1WHERE a1.item_index = 10 )i need to perform the above in a single query as i am using it in a trigger to update a table.PLZ HELP |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-04-25 : 21:41:47
|
Don't quite understand what are you trying to achieve. Please post your table schema, sample data and expected result KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
pritesh1908
Starting Member
4 Posts |
Posted - 2012-04-25 : 22:03:56
|
| the update_winnerslist table contains mail_id,item_index,bid_amount attributes.The table is already grouped by item_index.I am trying to get the email_id for item_index=10 with the lowest bid_amount i.e. the email_id of the person who made the lowest bid on item_index 10. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|