You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- FOLDER LOOKUP VIEW VIA FOLDERS INCLUDING PARENTDROPVIEW IF EXISTS temp.folderlist;
CREATEVIEWIF NOT EXISTS temp.folderlistASSELECT distinct(p.folder_id),
p.parent_id,
f1.propvalAS foldername
FROM folders p
JOIN folder_properties f1
ONf1.folder_id=p.folder_idANDf1.proptag=805371935ORDER BYp.folder_id
;
-- MSGs/FOLDERSIZESDROPVIEW IF EXISTS temp.messagecount;
CREATEVIEWIF NOT EXISTS temp.messagecountASSELECTfl.folder_idAS id,
fl.foldernameAS folder,
SUM(m.message_size) as foldersize,
count(m.message_id) AS count
FROM folderlist fl
LEFT JOIN messages m
ONfl.folder_id=m.parent_fidANDm.is_deleted=0WHEREfl.parent_id>1GROUP BYfl.folder_id,
fl.foldername
;
SELECT*FROM messagecount;
i already use those and other things, but would be gread to have a couple of VIEWS in the database by default 🙈
Just something for the future..
It would be nice to get those via api/cli aswell
like in the counterpart
The text was updated successfully, but these errors were encountered: