Topplista filmer
MEST SEDDA FILMER DENNA VECKA
SELECT DISTINCT program.namn, program.kdbnr, program.url, program.bild, program.poster, program.imdbgrade, logo, SUM(klick) AS total_klick, program.ingress, kanal.playnamn
FROM kanal, program, programklick, programetikett
WHERE program.kdbnr = kanal.kdbnr
AND program.pdbnr = programetikett.pdbnr
AND program.online LIKE '1'
AND programetikett.edbnr LIKE '1'
AND program.namn = programklick.namn
AND programklick.datum BETWEEN DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND CURDATE()
GROUP BY program.namn
ORDER BY total_klick DESC, program.pdbnr DESC
LIMIT 12