I have tried various grouping options for the following data in order to get the record for highest bid ONLY for each car but have had no success. I think I am overlooking the obvious 🙂
bidId, carID, bidamount, dateplaced, userID
45 83 650 5/11/2012 4:15:07 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
43 83 625 5/11/2012 4:12:51 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
41 83 600 5/11/2012 3:36:31 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
39 83 575 2/11/2012 4:06:57 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
56 83 575 9/11/2012 10:35:25 a.m. 0b3c2ba5-1538-4557-a6c0-7de701fd83e7
52 83 550 8/11/2012 1:40:37 p.m. 0b3c2ba5-1538-4557-a6c0-7de701fd83e7
38 83 550 2/11/2012 3:58:53 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
37 83 525 2/11/2012 3:58:19 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
49 83 525 7/11/2012 1:40:37 p.m. 0b3c2ba5-1538-4557-a6c0-7de701fd83e7
80 86 750 21/11/2012 3:17:53 p.m. 0b3c2ba5-1538-4557-a6c0-7de701fd83e7
69 86 725 20/11/2012 2:09:52 p.m. 0b3c2ba5-1538-4557-a6c0-7de701fd83e7
68 86 700 20/11/2012 2:09:33 p.m. 0b3c2ba5-1538-4557-a6c0-7de701fd83e7
59 86 675 13/11/2012 2:38:12 p.m. 0b3c2ba5-1538-4557-a6c0-7de701fd83e7
53 86 650 8/11/2012 10:35:25 a.m. 0b3c2ba5-1538-4557-a6c0-7de701fd83e7
47 86 625 5/11/2012 5:45:08 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
46 86 600 5/11/2012 5:45:04 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
44 86 575 5/11/2012 4:15:02 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
42 86 550 5/11/2012 3:36:40 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
40 86 525 5/11/2012 3:33:36 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
66 89 675 15/11/2012 4:21:40 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
65 89 650 15/11/2012 4:21:36 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
64 89 625 15/11/2012 4:21:15 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
63 89 600 15/11/2012 4:18:10 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
62 89 575 15/11/2012 4:17:57 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
61 89 550 15/11/2012 4:17:54 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
60 89 525 15/11/2012 4:17:51 p.m. a5d383e0-0c2c-44cf-9da1-0ce364b1dbdc
I dont know why some experienced users here voted to close this as @dbaseman has almost answered my question and understood what i was asking. PLEASE REOPEN so @dbaseman can complete his answer.
You can get an anonymous object with the car id and max bid by:
carIDbidamountFrom there it’s easy to convert to a dictionary if you like:
Edit
Since you need the user, the query has to be a bit different than above — here I ordered by bid amount and date placed, and took the first item.