Some useful drupal sql
Find uid given user nae (in this case naa)
select uid from users where name='naa';
Get the number of uploads by user 'naa'
select count(upload.fid) from upload, node where node.nid=upload.nid and node.uid=(select uid from users where name='naa');
Get the number of files owned by user 'naa'
select files.filepath from files, upload where upload.fid=files.fid and upload.nid=68652;
Find path to uploaded files:
select files.filepath from files, upload where upload.fid=files.fid and upload.nid=68652;
select uid from users where name='naa';
Get the number of uploads by user 'naa'
select count(upload.fid) from upload, node where node.nid=upload.nid and node.uid=(select uid from users where name='naa');
Get the number of files owned by user 'naa'
select files.filepath from files, upload where upload.fid=files.fid and upload.nid=68652;
Find path to uploaded files:
select files.filepath from files, upload where upload.fid=files.fid and upload.nid=68652;