SELECT ' ' as '#',url,' ' as 'path',datetime(last_visit_date/1000000,'unixepoch','localtime') as last_visit_date ,case when SUBSTR(content,10,1)='0' then ' in progress' when SUBSTR(content,10,1)='1' then 'completed 'when SUBSTR(content,10,1)=' 2' then 'in-complete' when SUBSTR(content,10,1)='3' then 'user cancled download' else ' ' end as 'state',' ' as 'bytes_downloaded',SUBSTR(content ,INSTR('.',content)+47,(length(content)))-1+1 as max_bytes FROM moz_annos a inner join moz_places b on a.place_id=b.id inner join moz_anno_attributes c on a.anno_attribute_id =c.id WHERE c.name LIKE '%metadata%'