as network, l1.filename, count(l1.file_id) AS NumberUploads FROM lab_upload_log AS l1 GROUP
BY lcase(l1.network), l1.filenameDISTINCT and GROUP BY give the same results, but internally DISTINCT is faster.
SELECT DISTINCT max(l1.upload_timestamp) AS LastUploadTimestamp,
lcase(l1.network) as network,
l1.filename, count(l1.file_id) AS NumberUploads
FROM lab_upload_log AS l1
GROUP BY lcase(l1.network), l1.filename