Zmiany pomiędzy wersją 30 and wersją 31 dla DeployerGuide/Custumization/AdvancedReporting/SQLExamples

Pokaż
Ignoruj:
Data i czas:
04/14/15 23:58:05 (10 years temu)
Autor:
JP (IP: 79.188.124.105)
Komentarz:

--

Legend:

Bez zmian
Dodane
Usunięte
Zmienione
  • DeployerGuide/Custumization/AdvancedReporting/SQLExamples

    v30 v31  
    1818-- Zwraca kalendarz dni, nr tygodnia, miesiąć dla bieżącego roku 
    1919-- przydatne do JOIN-owania z zapytaniami 
    20 SELECT ndate, nday, to_char(ndate, 'D')::int - 1 AS dayweek, to_char(ndate, 'WW') AS week, to_char(ndate, 'MM') AS month FROM 
     20SELECT ndate, nday,  
     21date_part('day', ndate)  || '(' || to_char(ndate, 'Dy') || ')' AS day, 
     22to_char(ndate, 'D')::int - 1 AS dayweek, to_char(ndate, 'WW') AS week, to_char(ndate, 'MM') AS month FROM 
    2123( 
    2224SELECT sr.sr AS nday, (date_trunc('year', now()) + (sr.sr || 'day')::interval)::date AS ndate 
    2325FROM generate_series(0,365) AS sr 
    2426) AS calendar 
     27 
    2528 
    2629