/****** Скрипт для команды SelectTopNRows из среды SSMS  ******/
SELECT distinct contactAltKey
  FROM [Dialog].[dbo].[SalesPos] as S
  left Join [Dialog].[dbo].[Cards] as C on C.cardAltKey = S.cardAltKey
  where [processDate] between '2023-01-01' and '2023-02-01' 
  and S.cardAltKey <> '00000000-0000-0000-0000-000000000000'
  and goodsAltKey in ('80c20050-5692-1a1d-11e7-1d2c3f97df39',
'80e90050-5693-70b7-11ec-26b4ee20685c',
'80d50050-5693-88ed-11ec-e3184b714552',
'80c20050-5692-1a1d-11e7-1d2cc92ae08f',
'80d70050-5693-88ed-11ed-3f0406ec748f',
'80ea0050-5693-70b7-11ec-4d30a99d3575',
'80e50050-5693-70b7-11ea-b48e8dd54d61',
'80e40050-5693-70b7-11ea-594db997a1b8',
'80e70050-5693-70b7-11eb-6c407bde1f49',
'80d50050-5693-88ed-11ec-f06598bb83ee',
'80e90050-5693-70b7-11ec-30d5875da14e',
'80e80050-5693-70b7-11eb-7690d23ae57a',
'80e90050-5693-70b7-11eb-a351dcb60bd7',
'80e60050-5693-70b7-11ea-fca7178aa640',
'80e70050-5693-70b7-11eb-46c19f786d89',
'80e70050-5693-70b7-11eb-28992a2fd579',
'80e40050-5693-70b7-11ea-9e6bef040f08',
'80e90050-5693-70b7-11ec-36f049962f6c',
'80e70050-5693-70b7-11eb-41154c314bd8',
'80e70050-5693-70b7-11eb-5bcbfa514953',
'80ea0050-5693-70b7-11ec-572b789d6049',
'80ea0050-5693-70b7-11ec-572b789d6052',
'80d70050-5693-88ed-11ed-7a0f77a3f15c',
'80d70050-5693-88ed-11ed-7d3c322caef0',
'80d50050-5693-88ed-11ed-2db3399f828a',
'80e50050-5693-70b7-11ea-a3d884320159',
'80e50050-5693-70b7-11ea-a3d884320158',
'80e50050-5693-70b7-11ea-a3d88432015a',
'80e90050-5693-70b7-11ec-0c99687cbcda',
'80ea0050-5693-70b7-11ec-89b5d6d3adec',
'80d70050-5693-88ed-11ed-489316830261',
'80e90050-5693-70b7-11ec-058774ef446b',
'80e90050-5693-70b7-11eb-960d23ce33fd',
'80ea0050-5693-70b7-11ec-572b7f24b4d0',
'80d50050-5693-88ed-11ec-e89be9e08c83',
'80e90050-5693-70b7-11ec-3279747866d0',
'80e90050-5693-70b7-11eb-f682fe7a04a1',
'80e90050-5693-70b7-11eb-f4640a49df34',
'80d50050-5693-88ed-11ed-0f405be3ff9d',
'80e40050-5693-70b7-11ea-58a4d1eee6d6',
'80c20050-5692-1a1d-11e7-1d2ced1ee5ea',
'80c20050-5692-1a1d-11e7-1d2c8d5bf086',
'80c20050-5692-1a1d-11e7-1d2ccf263149',
'80ea0050-5693-70b7-11ec-5d8e8e25737c',
'80e40050-5693-70b7-11ea-89e06d2e8372',
'80c20050-5692-1a1d-11e7-1d2d82da1c5c',
'80c20050-5692-1a1d-11e7-1d2d88d9b104')
  