1

我一直在尝试在不同场合整晚运行此查询,并且似乎一直收到“后端错误”。似乎所有其他月份都运行了(尽管有些人确实遇到了错误,所以我重新运行并且它起作用了)。

查询是:

SELECT 
  raw.c.Country_Name AS Country, 
  ytfin.yt_Channel AS YT_Channel, 
  ytfin.Account AS YT_Account, 
  raw.y.Content_Type AS Content_Type, 
  MIN(ytfin.Novation_Date) AS Novation_Date, 
  AVG(ytfin.Video_Duration_sec) AS Video_Duration_sec, 
  SUM(raw.y.Watch_Page_Views) AS Watch_Page_Views, 
  SUM(raw.y.Embedded_Player_Views) AS Embedded_Player_Views, 
  SUM(raw.y.Total_Earnings) AS Total_Earnings, 
  SUM(raw.y.Gross_YouTube_sold_Revenue) AS Gross_YouTube_sold_Revenue, 
  SUM(raw.y.Gross_Partner_sold_Revenue) AS Gross_Partner_sold_Revenue, 
  SUM(raw.y.Gross_AdSense_sold_Revenue) AS Gross_AdSense_sold_Revenue 
FROM 
  (SELECT 
     y.Video_ID, 
     y.Custom_ID, 
     y.Day, 
     y.Country, 
     c.Country_Name, 
     y.Content_Type, 
     y.Policy, 
     y.Embedded_Player_Views, 
     y.Watch_Page_Views, 
     y.Gross_YouTube_sold_Revenue, 
     y.Gross_Partner_sold_Revenue, 
     y.Gross_AdSense_sold_Revenue, 
     y.Total_Earnings 
   FROM 
     Youtube_Raw_Country.201206_Jun AS y 
   LEFT OUTER JOIN 
     Country_Codes.iso_3166_1_country_codes as c 
     ON y.Country = c.Code) AS raw
INNER JOIN 
  All_YT_Video_IDs.201206_Jun_2012 AS ytfin 
  ON raw.y.Video_ID = ytfin.Video_ID
GROUP BY Country, YT_Channel,YT_Account, Content_Type
4

0 回答 0