pgjacob Posted March 6, 2018 Report Share Posted March 6, 2018 Just wondering if there is a way to find the second lowest number in a view. I have done the SQL for lowest number: SELECT TOP(1) Drivers_Driver FROM _v_Race_Results_v WHERE Results_RID=[@field:RID] ORDER BY Results_Finish ASC I see it's possible by nesting queries using select distinct? Not sure. Just need to find the next lowest entry in this list. thanks Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted March 7, 2018 Report Share Posted March 7, 2018 You can try this : SELECT TOP 1 Drivers_Driver FROM (SELECT TOP 2 Drivers_Driver FROM _v_Race_Results_v WHERE Results_RID=[@field:RID] ORDER BY Results_Finish ASC ) AS tt ORDER BY Results_Finish DESC Quote Link to comment Share on other sites More sharing options...
0 futurist Posted August 23, 2022 Report Share Posted August 23, 2022 Hi @pgjacob You can also do something like this: You can call the second, third, fourth and whichever record Quote Link to comment Share on other sites More sharing options...
Question
pgjacob
Just wondering if there is a way to find the second lowest number in a view. I have done the SQL for lowest number:
SELECT TOP(1) Drivers_Driver FROM _v_Race_Results_v WHERE Results_RID=[@field:RID] ORDER BY Results_Finish ASC
I see it's possible by nesting queries using select distinct? Not sure. Just need to find the next lowest entry in this list.
thanks
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.