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 |
|
jerrinj
Starting Member
4 Posts |
Posted - 2001-08-06 : 07:03:11
|
| Hello Sql masters,I just want a simple solution using TOP predicate.I have 2 tables - a master and a detail.TableAorderId customer------- --------1 Balaji2 Adarshkumar3 Selma4 BadriTableBorderId itemNo------- ------1 10011 10031 10102 10033 10043 10103 10113 10204 1001I want the resultset to have the orderId, customer and the number of times the orderId is present in TableB.The resultset will have the record of the person who has the second highest number of items in his order. It will look something like given below:orderId customer no_of_items------- -------- -----------1 Balaji 3How to achieve the above result? |
|
|
|
|
|