Advertisement
Advertisement
| 05.08.2008 at 07:14AM PDT, ID: 23386127 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 05.08.2008 at 07:19AM PDT, ID: 21524921 |
1: 2: 3: |
select top 1 * from table where col1 <(select max(col1) from table) order by col1 desc |
| 05.08.2008 at 07:19AM PDT, ID: 21524929 |
1: 2: 3: 4: 5: |
select t.*
from yourtable t
where t.col1 = ( select max(p.col1) from yourtable p
where p.col1 < ( select max(i.col1) from yourtable i )
)
|
| 05.08.2008 at 07:31AM PDT, ID: 21525045 |
1: 2: 3: 4: 5: 6: |
SELECT MAX(CASE WHEN rn1=2 THEN col1 END) col1, MAX(CASE WHEN rn2=2 THEN col2 END) col2 FROM ( SELECT col1, col2, dense_rank() over (order by col1 desc) rn1, dense_rank() over (order by col2 desc) rn2 FROM tablename ) T |
| 05.08.2008 at 07:32AM PDT, ID: 21525054 |
1: 2: 3: 4: |
select (select max(col1) from table where col1 <(select max(col1) from table)), (select max(col2) from table where col2 <(select max(col2) from table)) |
| 05.08.2008 at 07:45AM PDT, ID: 21525177 |
1: 2: 3: 4: 5: 6: |
select t.*
from yourtable t
where t.col1 = ( select max(p.col1) from yourtable p
where p.col2 = t.col2
and p.col1 < ( select max(i.col1) from yourtable i where i.col2 = t.col2 )
)
|
| 05.08.2008 at 08:47AM PDT, ID: 21525749 |
| 05.08.2008 at 08:52AM PDT, ID: 21525787 |
1: 2: 3: 4: 5: 6: 7: |
SELECT DISTINCT col1, col2 FROM ( SELECT col1, col2, dense_rank() over (partition by col2 order by col1 desc) rn FROM tablename ) T WHERE rn=2 |