Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.54 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. select gu.email, trunc(sum(ds.file_size)/1e12,2) as fs_total from galaxy_user as gu
  2.         inner join history as h on gu.id = h.user_id
  3.         inner join history_dataset_association as hda on h.id = hda.history_id
  4.         inner join dataset as ds on hda.dataset_id = ds.id
  5.         where ds.deleted = False and ds.file_size > 0 and ds.id not in (select dataset.id from dataset inner join library_dataset_dataset_association on dataset.id = library_dataset_dataset_association.dataset_id)
  6.         group by gu.email
  7.         having sum(ds.file_size)/1e12 > 1
  8.         order by fs_total desc;