This commit is contained in:
Alexey Taymanov 2019-11-19 17:05:53 -05:00 коммит произвёл Marco Rossi
Родитель ddda35a8bd
Коммит 78e6db5247
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -45,13 +45,13 @@ DECLARE @OutputFileStatistics string = @OutputFolder + "statistics-{date:yyyy}-{
SELECT Timestamp.ToString("yyyy/MM/dd HH:00") AS hour,
model,
SUM(HasObservations != 0? (1.0 / (1.0 - pdrop)) : 0) AS obser,
SUM(Cost != 0? (1.0 / (1.0 - pdrop)) : 0) AS clicks,
SUM(-Cost / (1.0 - pdrop)) AS clicks,
SUM(1.0 / (1.0 - pdrop)) AS impressions,
SUM(Cost != 0 AND Action == 1? (1.0 / (1.0 - pdrop)) : 0) AS clicks1,
SUM(Action == 1? (-Cost / (1.0 - pdrop)) : 0) AS clicks1,
SUM(Action == 1? (1.0 / (1.0 - pdrop)) : 0) AS impressions1,
SUM(Cost != 0 AND Action == 1? (1.0 / (1.0 - pdrop)) / Prob : 0) AS clicksIps1,
SUM(Action == 1? (-Cost / (1.0 - pdrop)) / Prob : 0) AS clicksIps1,
SUM(Action == 1? (1.0 / (1.0 - pdrop)) / Prob : 0) AS impressionsIps1,
SUM(Cost != 0? (1.0 / (1.0 - pdrop)) / Prob / NumActions : 0) AS clicksIpsR,
SUM((-Cost / (1.0 - pdrop)) / Prob / NumActions) AS clicksIpsR,
SUM((1.0 / (1.0 - pdrop)) / Prob / NumActions) AS impressionsIpsR,
(SUM(1.0) / SUM(1.0 / (1.0 - pdrop))) AS PassRatio,
date