|
|
|
|
|
by grandpoobah
1407 days ago
|
|
something like this? SELECT TOP 50 * FROM [things] [post] JOIN [things] [category] ON [category].[id] = [post].[parent_id] WHERE [post].[type] = 'post' AND [category].[type] = 'category'
AND [category].[slug] = 'animal-pictures' ORDER BY ([post].[child_count] / DATEDIFF('hh', [post].[created_date], GETUTCDATE()) DESC; |
|