DROP TABLE IF EXISTS SampleDBTutorials.dbo.ReferrersPerDay; //Créer la table ReferrersPerDay pour y stocker les références ...

DROP TABLE IF EXISTS SampleDBTutorials.dbo.ReferrersPerDay;

//Créer la table ReferrersPerDay pour y stocker les références provenant de sites web externes
CREATE TABLE SampleDBTutorials.dbo.ReferrersPerDay
(
    INDEX idx1
    CLUSTERED(Year ASC)
    PARTITIONED BY HASH(Year)
) AS 

SELECT s_date.Year AS Year,
       s_date.Month AS Month,
       s_date.Day AS Day,
       cs_referer,
       sc_status,
       COUNT(DISTINCT c_ip) AS cnt
FROM SampleDBTutorials.dbo.WeblogsView() AS weblog
GROUP BY s_date,
         cs_referer, 
         sc_status;
English
English (United States)
Deutsch (Deutschland)
German (Germany)
Español (España)
Spanish (Spain)
Français (France)
French (France)
日本語
Japanese
한국어
Korean
Русский
Russian