
SELECT 'POOLS' as 'Type';
SELECT ID, PoolName, ChargingMethod, ChargingAmount FROM tblpools ORDER BY ID DESC;

SELECT 'COMPLETED_TASKS' as 'Type';
SELECT t.ID, t.PoolID, t.TaskName, t.TaskCost, t.HoursWorked, t.TotalAmount, p.ChargingMethod, p.ChargingAmount 
FROM tblmaintenance_tasks t 
LEFT JOIN tblpools p ON t.PoolID = p.ID 
WHERE t.Status='Ολοκληρωμένο' 
ORDER BY t.ID DESC 
LIMIT 3;

SELECT 'TODAY_TASKS' as 'Type';
SELECT t.ID, t.PoolID, t.TaskName, t.DueDate, p.ChargingMethod, p.ChargingAmount 
FROM tblmaintenance_tasks t 
LEFT JOIN tblpools p ON t.PoolID = p.ID 
WHERE DATE(t.DueDate) = CURDATE()
ORDER BY t.ID DESC;
