Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select record for every month
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2014
Application:
Desktop
Divers
Thread ID:
01613120
Message ID:
01613129
Vues:
36
Hi Borislav, first of all please accept my apologies for the misinformation I gave you, I was typing from memory ( obviously not a good one ) on the train - here are my actual data structures, as you can see the first table can have many records for owner_id and many records for the same month
Table 1 
owner_id	sale_date	                               id
Peter	2014-01-02 00:00:00.000	1
Peter	2014-01-02 00:00:00.000	2
Peter	2014-02-04 00:00:00.000	3
Peter	2014-02-04 00:00:00.000	4
Peter	2014-03-06 00:00:00.000	5
Peter	2014-03-06 00:00:00.000	6
Peter	2014-04-08 00:00:00.000	7
Paul	        2014-01-02 00:00:00.000	8
Paul        2014-01-02 00:00:00.000        9
Paul        2014-02-02 00:00:00.000	       10
Paul        2014-02-02 00:00:00.000       11
Paul	       2014-03-02 00:00:00.000       12
Paul	       2014-04-02 00:00:00.000       13
Paul	      2014-04-02 00:00:00.000        14
Mary      2014-06-01 00:00:00.000        15


Table 2
opp_id	amtfinanced
1	               2000.00
2	             12000.00
3	             12000.00
4	             13000.00
5	             14000.00
6	             15000.00
7	             16000.00
8	             12000.00
9	             13000.00
10	             14000.00
11	             15000.00
12	             16000.00
13	             17000.00
14                 18000.00
15	         1000000.00
17             2000000.00
is this still achievable ?
Regards,
Peter J. Kane



Pete
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform