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 10 *, 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
|
 |
 |
 |
 |
 |
|
| 8103 |
|
|
2026-12-01 |
1 |
|
| 8102 |
|
|
2026-12-01 |
1 |
|
| 8101 |
|
|
2026-12-01 |
1 |
|
| 8100 |
|
|
2026-11-30 |
1 |
|
| 8099 |
|
|
2026-11-30 |
1 |
|
| 8098 |
|
|
2026-11-30 |
1 |
|
| 8097 |
|
|
2026-11-30 |
1 |
|
| 8096 |
|
|
2026-11-30 |
2 |
|
| 8095 |
|
|
2026-11-29 |
2 |
|
| 8094 |
|
|
2026-11-29 |
1 |
|
|
|
|
|
|
|