Click here to Skip to main content
15,789,840 members
Home / Discussions / Database
   

Database

 
AnswerRe: Grouping From & To continuous dates in SQL Server Pin
Umer Akram11-Jan-15 20:56
Umer Akram11-Jan-15 20:56 
QuestionLong running queries. Pin
sathish487-Jan-15 3:38
sathish487-Jan-15 3:38 
AnswerRe: Long running queries. Pin
ZurdoDev7-Jan-15 4:33
professionalZurdoDev7-Jan-15 4:33 
AnswerRe: Long running queries. Pin
Mycroft Holmes7-Jan-15 14:34
professionalMycroft Holmes7-Jan-15 14:34 
AnswerRe: Long running queries. Pin
Swinkaran7-Jan-15 17:26
professionalSwinkaran7-Jan-15 17:26 
QuestionYearly sales report Pin
pkfox5-Jan-15 21:26
professionalpkfox5-Jan-15 21:26 
AnswerRe: Yearly sales report Pin
Mycroft Holmes5-Jan-15 21:58
professionalMycroft Holmes5-Jan-15 21:58 
GeneralRe: Yearly sales report Pin
pkfox5-Jan-15 23:11
professionalpkfox5-Jan-15 23:11 
Hi there and thank you for your time, please accept my apologies for the misinformation I was typing from memory on the train, the actual data structures are as follows , 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	close_date	opp_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 doable ?
We can’t stop here, this is bat country - Hunter S Thompson RIP

GeneralRe: Yearly sales report Pin
Umer Akram6-Jan-15 1:13
Umer Akram6-Jan-15 1:13 
GeneralRe: Yearly sales report Pin
pkfox6-Jan-15 7:39
professionalpkfox6-Jan-15 7:39 
GeneralRe: Yearly sales report Pin
pkfox10-Jan-15 23:20
professionalpkfox10-Jan-15 23:20 
GeneralRe: Yearly sales report Pin
Umer Akram11-Jan-15 20:18
Umer Akram11-Jan-15 20:18 
QuestionWhat is Schema of a Database Pin
King Fisher25-Dec-14 21:27
professionalKing Fisher25-Dec-14 21:27 
AnswerRe: What is Schema of a Database Pin
Kornfeld Eliyahu Peter25-Dec-14 22:10
professionalKornfeld Eliyahu Peter25-Dec-14 22:10 
Questionmysql 1 to many ralationship Pin
Raymart Calinao (AsthreA)20-Dec-14 18:34
Raymart Calinao (AsthreA)20-Dec-14 18:34 
GeneralRe: mysql 1 to many ralationship Pin
PIEBALDconsult20-Dec-14 19:17
professionalPIEBALDconsult20-Dec-14 19:17 
GeneralRe: mysql 1 to many ralationship Pin
Raymart Calinao (AsthreA)20-Dec-14 19:23
Raymart Calinao (AsthreA)20-Dec-14 19:23 
GeneralRe: mysql 1 to many ralationship Pin
PIEBALDconsult20-Dec-14 19:26
professionalPIEBALDconsult20-Dec-14 19:26 
QuestionMySQL Query Example/Solution of Oracle Query Pin
M Riaz Bashir19-Dec-14 6:08
M Riaz Bashir19-Dec-14 6:08 
QuestionRe: MySQL Query Example/Solution of Oracle Query Pin
Eddy Vluggen19-Dec-14 6:20
professionalEddy Vluggen19-Dec-14 6:20 
AnswerRe: MySQL Query Example/Solution of Oracle Query Pin
Jörgen Andersson19-Dec-14 8:17
professionalJörgen Andersson19-Dec-14 8:17 
GeneralRe: MySQL Query Example/Solution of Oracle Query Pin
Eddy Vluggen19-Dec-14 8:31
professionalEddy Vluggen19-Dec-14 8:31 
GeneralRe: MySQL Query Example/Solution of Oracle Query Pin
Jörgen Andersson19-Dec-14 9:06
professionalJörgen Andersson19-Dec-14 9:06 
GeneralRe: MySQL Query Example/Solution of Oracle Query Pin
M Riaz Bashir20-Dec-14 8:26
M Riaz Bashir20-Dec-14 8:26 
GeneralRe: MySQL Query Example/Solution of Oracle Query Pin
Jörgen Andersson4-Jan-15 3:45
professionalJörgen Andersson4-Jan-15 3:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.