Ignore:
Timestamp:
25/05/07 13:38:23 (12 years ago)
Author:
ko23
Message:

Update deployment count query

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/StubB/XQuery/DeploymentCount.xquery

    r2483 r2512  
    33element table { 
    44for $Act in collection('/db/ndg_B_metadata/badc.nerc.ac.uk')/dgMetadata/dgMetadataRecord 
    5 [exists(dgActivity)] 
     5[exists(dgActivity/ActivityDeployment)] 
    66order by count($Act/dgActivity/ActivityDeployment) descending  
    77return  
     
    1414}, 
    1515element table { 
    16 for $Act in collection('/db/ndg_B_metadata/badc.nerc.ac.uk')/dgMetadata/dgMetadataRecord 
    17 [exists(dgDataProductionTool)] 
    18 order by count($Act/dgDataProductionTool/DPTDeployment) descending  
     16for $DPT in collection('/db/ndg_B_metadata/badc.nerc.ac.uk')/dgMetadata/dgMetadataRecord 
     17[exists(dgDataProductionTool/DPTDeployment)] 
     18order by count($DPT/dgDataProductionTool/DPTDeployment) descending  
    1919return  
    2020element tr { 
    21 element td {data($Act/dgMetadataID/localIdentifier)} 
     21element td {data($DPT/dgMetadataID/localIdentifier)} 
    2222,  
    23 element td {data($Act/name)}, 
    24 element td {data(count($Act/dgDataProductionTool/DPTDeployment))} 
     23element td {data($DPT/name)}, 
     24element td {data(count($DPT/dgDataProductionTool/DPTDeployment))} 
    2525} 
    2626}, 
    2727element table { 
    28 for $Act in collection('/db/ndg_B_metadata/badc.nerc.ac.uk')/dgMetadata/dgMetadataRecord 
    29 [exists(dgObservationStation)] 
    30 order by count($Act/dgObservationStation/ObsStnDeployment) descending  
     28for $ObsStn in collection('/db/ndg_B_metadata/badc.nerc.ac.uk')/dgMetadata/dgMetadataRecord 
     29[exists(dgObservationStation/ObsStationDeployment)] 
     30order by count($ObsStn/dgObservationStation/ObsStationDeployment) descending  
    3131return  
    3232element tr { 
    33 element td {data($Act/dgMetadataID/localIdentifier)} 
     33element td {data($ObsStn/dgMetadataID/localIdentifier)} 
    3434,  
    35 element td {data($Act/name)}, 
    36 element td {data(count($Act/dgObservationStation/ObsStnDeployment))} 
     35element td {data($ObsStn/name)}, 
     36element td {data(count($ObsStn/dgObservationStation/ObsStationDeployment))} 
    3737} 
    3838}, 
    3939element table { 
    40 for $Act in collection('/db/ndg_B_metadata/badc.nerc.ac.uk')/dgMetadata/dgMetadataRecord 
    41 [exists(dgDataProductionTool)] 
    42 order by count($Act/dgDataEntity/RelatedDeployment) descending  
     40for $DE in collection('/db/ndg_B_metadata/badc.nerc.ac.uk')/dgMetadata/dgMetadataRecord 
     41[exists(dgDataEntity/RelatedDeployment)] 
     42order by count($DE/dgDataEntity/RelatedDeployment) descending  
    4343return  
    4444element tr { 
    45 element td {data($Act/dgMetadataID/localIdentifier)} 
     45element td {data($DE/dgMetadataID/localIdentifier)} 
    4646,  
    47 element td {data($Act/name)}, 
    48 element td {data(count($Act/dgDataEntity/RelatedDeployment))} 
     47element td {data($DE/name)}, 
     48element td {data(count($DE/dgDataEntity/RelatedDeployment))} 
    4949} 
    5050} 
Note: See TracChangeset for help on using the changeset viewer.