Changeset 18609
- Timestamp:
- Jul 17, 2008, 4:12:41 PM (18 years ago)
- Location:
- trunk/ippTools/share
- Files:
-
- 3 edited
-
stacktool_definebyquery_part1.sql (modified) (1 diff)
-
stacktool_definebyquery_part2.sql (modified) (1 diff)
-
stacktool_definebyquery_test.sql (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/stacktool_definebyquery_part1.sql
r18579 r18609 4 4 5 5 SELECT 6 * 6 skycell_id, 7 tess_id, 8 filter, 9 num_warp, 10 MAX(num_stack) AS num_stack 7 11 FROM (( 8 12 -- Number of stack-ready warps as a function of skycell and filter -
trunk/ippTools/share/stacktool_definebyquery_part2.sql
r18579 r18609 20 20 GROUP BY 21 21 stack_id 22 -- This ORDER BY is important: it sets the final num_stack that23 -- comes out of the top-level GROUP BY. We want it to be the24 -- biggest number for a skycell/filter combination.25 ORDER BY26 num_stack DESC27 22 ) AS stackSizes 28 23 -- JOINing the warpsToStack and stackSizes tables -
trunk/ippTools/share/stacktool_definebyquery_test.sql
r18579 r18609 11 11 -- stacktool_definebyquery_part1.sql 12 12 SELECT 13 * 13 skycell_id, 14 tess_id, 15 filter, 16 num_warp, 17 MAX(num_stack) AS num_stack 14 18 FROM (( 15 19 -- Number of stack-ready warps as a function of skycell and filter … … 30 34 AND warpSkyfile.fault = 0 31 35 -- Any additional selection on warps/exposures goes here 32 33 36 -- stacktool_definebyquery_part2.sql 34 37 GROUP BY … … 42 45 tess_id, 43 46 filter, 44 stack_id,45 47 COUNT(stackInputSkyfile.warp_id) as num_stack -- number of warps in a stack 46 48 FROM stackRun … … 48 50 GROUP BY 49 51 stack_id 50 -- This ORDER BY is important: it sets the final num_stack that51 -- comes out of the top-level GROUP BY. We want it to be the52 -- biggest number for a skycell/filter combination.53 ORDER BY54 num_stack DESC55 52 ) AS stackSizes 56 53 -- JOINing the warpsToStack and stackSizes tables
Note:
See TracChangeset
for help on using the changeset viewer.
