Select Count(*), CEILING(CAST(Count(*) AS FLOAT)/10) from Board as a left outer join Answer as b on a.idx=b.BoardID where a.inUse = 1 and a.kind = 'counsel' and a.UserID = '' Select Top 8100 *, a.idx as idx, b.idx as idx1, a.inDate as inDate, b.inDate as AnswerDate from Board as a left outer join Answer as b on a.idx=b.BoardID where a.inUse = 1 and a.kind = 'counsel' and a.UserID = '' order by a.StepNo desc, a.Step, a.inDate desc
text
|
 |
 |
 |
 |
 |
|
| 13 |
|
|
2017-03-12 |
663 |
|
| 12 |
|
|
2017-03-12 |
665 |
|
| 11 |
|
|
2017-03-12 |
628 |
|
| 10 |
|
|
2015-02-12 |
705 |
|
| 9 |
|
|
2015-02-12 |
920 |
|
| 8 |
|
|
2015-02-11 |
667 |
|
| 7 |
|
|
2015-02-10 |
694 |
|
| 6 |
|
|
2015-02-06 |
572 |
|
| 5 |
|
|
2015-02-06 |
582 |
|
| 4 |
|
|
2015-02-05 |
738 |
|
|
|
|
|
|
|