- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmaster.sql
More file actions
Latest commit
6 lines (6 loc) · 597 Bytes
/
Copy pathmaster.sql
File metadata and controls
6 lines (6 loc) · 597 Bytes
1
2
3
4
5
6
SELECT'--- Printing Most Popular Articles ---';
SELECTtop.popularFROM vw_toparticles top ORDER BYtop.countDESC;
SELECT'--- Printing Most Popular Authors ---';
SELECT popular FROM vw_topAuthors;
SELECT'--- Printing Error Messages ---';
SELECT CONCAT(FORMAT('%s - %s', to_char(OK.date::DATE, 'FMMonth DD, YYYY'), (100* (Err.Count::numeric/ (Ok.Count+Err.Count)))::numeric(3,2)::TEXT) , '%') as TotalError FROM vw_httpStatusOK OK INNER JOIN vw_httpStatusError Err ONOK.date=Err.DateGROUP BYOK.date, Ok.Count, Err.CountHAVING (100* (Err.Count::numeric/ (Ok.Count+Err.Count))) >1;