Click here to Skip to main content
14,427,367 members
   

Database

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder16-Jul-09 4:10
cofounderChris Maunder16-Jul-09 4:10 
PinnedHow to get an answer to your question PinPopular
Chris Maunder10-Nov-05 17:30
cofounderChris Maunder10-Nov-05 17:30 
QuestionOracle SQL query to MS-SQL Pin
Member 951930620-Jan-20 23:37
MemberMember 951930620-Jan-20 23:37 
AnswerRe: Oracle SQL query to MS-SQL Pin
Richard Deeming21-Jan-20 2:43
communityengineerRichard Deeming21-Jan-20 2:43 
Questionsplit time then group by 15 min mongodb Pin
Member 1300557210-Jan-20 22:56
MemberMember 1300557210-Jan-20 22:56 
I have a Schema in mongodb like:-

{
_id: ObjectId("5e05c1089b3e4e333cee8c39"),
name:"Alex",
activity:[{
{
            _id: ObjectId("5e05c1089b3e4e333cee8c39"),
            type: 'run',
            start_timestamp: ISODate("2020-01-11T11:34:59.804Z"),
            end_timestamp: ISODate("2020-01-11T11:40:00.804Z")
        },
       {
            _id: ObjectId("5e05c1089b3e4e333cee8c40"),
            type: 'stop',
            start_timestamp: ISODate("2020-01-11T11:40:00.804Z"),
            end_timestamp: ISODate("2020-01-11T11:42:00.804Z")
        },
        {
            _id: ObjectId("5e05c1089b3e4e333cee8c41"),
            type: 'wait',
            start_timestamp: ISODate("2020-01-11T11:42:00.804Z"),
            end_timestamp: ISODate("2020-01-11T11:52:00.804Z")
        },
}]
}

This is a schema for a man activity, i need to find brake-up of every 15 minute (brake-up duration in minute) like

{
        _id: "2020-01-11T11:34 to 2020-01-11T11:49" ,
        duration: 15,
        brake-up:{
          run:6,
          stop:2,
          wait:7
        }
    }

here type: wait should be split into 2 duration "2020-01-11T11:34 to 2020-01-11T11:49" 7 min and "2020-01-11T11:49 to 2020-01-11T12:04" 3 min .

{
            _id: "2020-01-11T11:34 to 2020-01-11T12:04" ,
            duration: 15,
            brake-up:{
              wait:3
            }
        },

Thanks

modified 11-Jan-20 4:10am.

QuestionMessage Closed Pin
8-Jan-20 0:12
Memberqweitmen8-Jan-20 0:12 
QuestionSQL Query with a Loop Pin
Bobby Underwood6-Jan-20 5:58
MemberBobby Underwood6-Jan-20 5:58 
AnswerRe: SQL Query with a Loop Pin
#realJSOP6-Jan-20 6:04
mva#realJSOP6-Jan-20 6:04 
AnswerRe: SQL Query with a Loop Pin
Bobby Underwood6-Jan-20 6:11
MemberBobby Underwood6-Jan-20 6:11 
AnswerRe: SQL Query with a Loop Pin
#realJSOP6-Jan-20 6:16
mva#realJSOP6-Jan-20 6:16 
GeneralRe: SQL Query with a Loop Pin
Bobby Underwood6-Jan-20 6:22
MemberBobby Underwood6-Jan-20 6:22 
AnswerRe: SQL Query with a Loop Pin
Jörgen Andersson7-Jan-20 6:52
communityengineerJörgen Andersson7-Jan-20 6:52 
QuestionMessage Closed Pin
2-Jan-20 1:00
Memberaskinranks2-Jan-20 1:00 
QuestionMessage Closed Pin
2-Jan-20 0:59
Memberaskinranks2-Jan-20 0:59 
Questionincorrect syntax near begin expecting external for Alter Procedure Pin
simpledeveloper27-Dec-19 10:23
Membersimpledeveloper27-Dec-19 10:23 
AnswerRe: incorrect syntax near begin expecting external for Alter Procedure Pin
Jörgen Andersson28-Dec-19 0:14
communityengineerJörgen Andersson28-Dec-19 0:14 
QuestionAdding multiple columns with condition Pin
simpledeveloper26-Dec-19 15:58
Membersimpledeveloper26-Dec-19 15:58 
AnswerRe: Adding multiple columns with condition Pin
Mycroft Holmes26-Dec-19 20:58
MemberMycroft Holmes26-Dec-19 20:58 
AnswerRe: Adding multiple columns with condition Pin
Jörgen Andersson27-Dec-19 4:40
communityengineerJörgen Andersson27-Dec-19 4:40 
GeneralRe: Adding multiple columns with condition Pin
simpledeveloper27-Dec-19 6:29
Membersimpledeveloper27-Dec-19 6:29 
GeneralRe: Adding multiple columns with condition Pin
Jörgen Andersson27-Dec-19 6:32
communityengineerJörgen Andersson27-Dec-19 6:32 
GeneralRe: Adding multiple columns with condition Pin
simpledeveloper27-Dec-19 9:44
Membersimpledeveloper27-Dec-19 9:44 
QuestionMessage Closed Pin
25-Dec-19 5:46
MemberMember 1469959425-Dec-19 5:46 
QuestionMessage Closed Pin
25-Dec-19 5:46
MemberMember 1469959425-Dec-19 5:46 
QuestionCrystal Report to SQL server 2012 database Pin
Member 1447460719-Dec-19 11:39
MemberMember 1447460719-Dec-19 11:39 

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.