我需要获得视频的平均评分,对于该视频,有一个名为发布日期的字段,所以我需要在发布日期之前和发布日期之后获得评分,
现在我有查询仅在视频发布日期之前获得评级,如下所示
select d.mth Month,
coalesce(avg(t.rating), 0) Rating
from
(
select 1 mth union all
select 2 mth union all
select 3 mth union all
select 4 mth union all
select 5 mth union all
select 6 mth union all
select 7 mth union all
select 8 mth union all
select 9 mth union all
select 10 mth union all
select 11 mth union all
select 12 mth
) d
left join wp_fatalcut_videos_rating t
on d.mth = month(t.ratingdate)
where d.mth in (1,2,3,4,5,6,7,8,9,10,11,12) and videoid='3192763' and ratingdate <= '2013-10-09 00:00:00'
group by d.mth
我需要在同一查询中获得“2013-10-09 00:00:00”之后的视频发布后的评级,这可能吗?