Advertisement
Guest User

Untitled

a guest
Apr 9th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 1.21 KB | None | 0 0
  1. SELECT  [Opportunity].[Result_event_attrID],
  2.         [Lead].[Lead_ID],
  3.         [Opportunity].[State_attrID],
  4.         [Opportunity].[Status_attrID],
  5.         [Opportunity].[Own_Funds],
  6.         [Opportunity].[BorrowedFunds],
  7.         [Opportunity].[First_Paysum],
  8.         [Opportunity].[Contract_Price],
  9.         [Opportunity].[Total_Area],
  10.         [Opportunity].[Type_Opportunity_attrID],
  11.         [Opportunity].[Fact_Area],
  12.         [Opportunity].[Opportunity_Cost],
  13.         [Opportunity].[BTI_Pricefix],
  14.         [Opportunity].[Not_Paid_Area],
  15.         [Opportunity].[Own_Funds],
  16.         [PIK_fact_call_details].[talk_time],
  17.         [PIK_fact_call_details].[hold_time],
  18.         [PIK_fact_call_details].[busy_time],
  19.         [PIK_fact_call_details].[wrap_time],
  20.         [PIK_fact_call_details].[call_dialing_dur],
  21.         [PIK_fact_call_details].[queue_size],
  22.         [PIK_fact_call_details].[call_wait_qty]
  23.     FROM [PIK_DWH].[dbo].[Call_CRM] AS Call_CRM
  24.         INNER JOIN [PIK_DWH].[Phone].[PIK_fact_call_details] AS PIK_fact_call_details ON
  25.         [Call_CRM].[CallCenterID] = [PIK_fact_call_details].[global_call_call_key]
  26.         INNER JOIN [PIK_DWH].[dbo].[Lead] AS Lead ON
  27.         [Call_CRM].[Call_CRM_ID] = [Lead].[Call_CRM_ID]
  28.         JOIN [PIK_DWH].[dbo].[Opportunity] AS Opportunity ON
  29.         [Lead].[Lead_ID] = [Opportunity].[Lead_ID]
  30.         WHERE [Lead].[Call_CRM_ID] != -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement