Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with completed sql call
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Help with completed sql call
Divers
Thread ID:
00616796
Message ID:
00616796
Vues:
56
I'm trying to create a query (possibly a stored procedure) that returns the following items by procedure

Procedure
# of procedures performed
Avg Time of the procedure
Avg Resource Cost

example results would be
procid  procdesc    # done     Avg Time (Minutes)    Avg Cost
---------------------------------------------------------------
 51.23  LAP CHOLE     12         90                   723.12
 51.25  LAP HYST       5         75                   653.00

Tables Include:
1) Meetings - has the time ProcedureStart,ProcedureEnd (Datetimes)
2) MeetProc - has the procid & description linked to meetings on meetingnumber
3) coCaseData - has the inventoryID, Qty, ItemUnitCost linked to meetings on meetingnumber
Factors:

- there is 1 meeting record per case
- there maybe more than 1 meetproc record for each meeting record, if there is more than 1, it will be a different procedure

- there maybe more than 1 coCaseData record for each meeting record


Thanks
Kirk
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform