poroto20

Untitled

Jul 18th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. select * from (
  2. SELECT dm.id_entregable, dm.dataProjectReference, dm.seisAcquisitionType, dm.seisEnvironment, dm.seisAreaName, dm.dataStudyName, dm.sdmStandardsVersion, dm.dataShipID, dm.sdmConsecutivo, dm.dataShipID AS itemKey , count(dmr.itemkey) AS mediaCount
  3. FROM catalog_DeliverableMetadata AS DM
  4. INNER JOIN catalog_DeliverableMediaRelation AS DMR
  5. ON DMR.sdmShipmentDeliverableID = DM.sdmShipmentDeliverableID
  6. WHERE (dm.SdmDeliverableStatus IN
  7. ('Ready to load',
  8. 'Ready for More Data',
  9. 'Ready to QC',
  10. 'Ready For Data QC')
  11. )
  12. GROUP BY dm.dataShipID
  13. ) AS WORKROUND WHERE 1=1
Advertisement
Add Comment
Please, Sign In to add comment