General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Network:
Windows 2008 Server
>I need help with a sql string. My table has a serial number column which is unique. The second column has a part number which can be duplicatied but not in all cases. The third column is an airplane tail number which is the same for all records in set. I need the top two serial numbers(if only 1 exists then top 1) for every distinct part number filtered by the tail number.
>
>Example:
>S/n P/n T/n
>1 845-1 XYZ
>2 846-1 XYZ
>3 846-1 XYZ
>4 846-1 XYZ
>5 847-1 XYZ
What do you mean by "top two"? Most common? Lowest numbers? Highest numbers?
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only