How to calculate average daily time of the Start_Time and End_Time fields
I am using ORACLE 11 G on Red Hat Linux, I have calculated the average daily time of multiple transactions for each day. The followign is the querry that shows the difference between the fields end_time start_ time and time.
Select TRIP_LOAD_STARTED AS START_TIME, TRIP_LOAD_ENDED'RE END_TIME.
ceil ((TRIP_LOAD_EDDT-TRIP_LOAD_STDT) * 1440) "time difference Bw Start and End.
of GATE2GATE_ACTIVITY_VW
Where TRIP_LOAD_STARTED > = February 1, 14 '
AND TRIP_LOAD_ENDED < 3 February 14 '
ORDER BY TRIP_LOAD_STARTED;
The querry above gives me the result as follows:
Start_Time End_Time time Diff bw begins and ends
1 FEBRUARY 14 FEBRUARY 1, 14 18
1 FEBRUARY 14 FEBRUARY 1, 14 18
1 FEBRUARY 14 FEBRUARY 1, 14 18
1 FEBRUARY 14 FEBRUARY 1, 14 18
1 FEBRUARY 14 FEBRUARY 1, 14 18
1 FEBRUARY 14 FEBRUARY 1, 14 18
1 FEBRUARY 14 FEBRUARY 1, 14 12
FEBRUARY 2, 14 2 FEBRUARY 14 29
FEBRUARY 2, 14 2 FEBRUARY 14 29
FEBRUARY 2, 14 2 FEBRUARY 14 29
FEBRUARY 2, 14 2 FEBRUARY 14 29
FEBRUARY 2 FEBRUARY 2, 14 14 19
FEBRUARY 2 FEBRUARY 2, 14 14 19
FEBRUARY 2 FEBRUARY 2, 14 14 19
It shows two dates for which I want to get the average duration in minutes for each group to date by the start time.
I use the following querry that probably gives me the average two days mentioned in where clause
Select the floor (avg ((TRIP_LOAD_STARTED-TRIP_LOAD_ENDED) * 1440)) 'average of Minutes of time.
of gate2gate_activity_vw
Where TRIP_LOAD_STDT > = February 1, 14 '
AND TRIP_LOAD_STDT < 3 February 14 ';
Average duration in Minutes
29
Can someone help me to a daily average time calculated between start and end.
Kind regards
mhamidch
Is that what you want:
SELECT trunc (TRIP_LOAD_STARTED), trunc (TRIP_LOAD_ENDED).
floor (avg (ceil ((TRIP_LOAD_ENDED-TRIP_LOAD_STARTED) * 1440))) Diff
OF GATE2GATE_ACTIVITY_VW
WHERE TRIP_LOAD_STARTED > = to_date('01/FEB/2014','dd/MON-YYYY')
AND TRIP_LOAD_ENDED<>
Trunc GROUP (TRIP_LOAD_STARTED), trunc (TRIP_LOAD_ENDED)
Always the example of create table and insert statements to verify the results and use the to_date with date format function.
Post edited by: Elya
Tags: Database
Similar Questions
-
How long does take to set up the date and time
How long does take to set up the date and time
Less than a minute.
Settings > general > time zone > set automatically
If this does not work, try the help in this support article > If your Apple TV will stop to display date and time on startup - Apple Support
-
I filled out a form on the page 8 and he saved several times along the way, and now when I open this file, the form is empty? How can I save my work so I can open the form later and it contains all my data?
Hi Eileen97933052,
The PDF form must be extended drive in order to have this feature to save & print the form data.
Please confirm by the PDF Creator is the PDF reader or not extended.
Otherwise, if you have Acrobat installed on your system, you can reader extend PDF form yourself.
Kind regards
Nicos
-
How to access a certain date in the date and time field SQL Server
I have a field named job_date in a table in my database of the 8 SQL Server.
The data type is datetime.
Thus, the values for the fields as the 2013-03-11 15:55:52.000 look.
How to query this field to include only the values of a certain date?
For example
< cfquery name = "get_job_name" datasource = 'abc' >
SELECT FROM job_info job_date WHERE Job_name = March 12, 2013"
< / cfquery >
When I query the field now I get NO RECORDS.
This is because as the fields like this 15:55:52.000 2013-03-11. instead of this March 12, 2013"
How to access a certain date in the date and time field SQL Server when its formatting as this 15:55:52.000 2013-03-11. ?
where job_date > = TheDateYouWant
and job_date<>
In addition, the format is irrelevent. The only issue of date formats time is when you want to display.
-
Remember - this is a public forum so never post private information such as numbers of mail or telephone!
Previously I was using WIndow Vista Home Premium but recently I installed Windows Vista Ultimate.I m having problem my computer turns off automatically (is not closed correctly at the time of the switches) and when I start it gives message that windows do not close properly seeded.
- You have problems with programs
- Error messages
- Recent changes to your computer
- What you have already tried to solve the problem
Hello
Look in the Event Viewer to see if something is reported on those.
http://www.computerperformance.co.UK/Vista/vista_event_viewer.htmMyEventViewer - free - a simple alternative in the standard Windows Event Viewer.
TIP - Options - Advanced filter allows you to see a period of time instead of the entire file.
http://www.NirSoft.NET/utils/my_event_viewer.html-------------------------------------------------------------------------
Also this, so you can see the probable bluescreens.Windows Vista restarts automatically if your computer encounters an error that requires him to plant.
http://www.winvistatips.com/disable-automatic-restart-T84.html-------------------------------------------------------------------------
Here are a few ways to possibly fix the blue screen issue. If you could give the blue screen
info that would help. Such as ITC and 4 others entered at the bottom left. And all others
information on errors such as STOP and information such as IRQL_NOT_LESS_OR_EQUAL codes or
PAGE_FAULT_IN_NONPAGED_AREA and similar messages.As examples:
BCCode: 116
BCP1: 87BC9510
BCP2: 8C013D80
BCP3: 00000000
BCP4: 00000002or in this format:
Stop: 0 x 00000000 (oxoooooooo oxoooooooo oxoooooooo oxooooooooo)
Tcpip.sys - address blocking 0 x 0 00000000 000000000 DateStamp 0 x 000000000It is an excellent tool for displaying the blue screen error information
BlueScreenView scans all your minidump files created during "blue screen of death," collisions
http://www.NirSoft.NET/utils/blue_screen_view.html
Displays information on all the "crash" of a table - freeBlueScreens many are caused by old or damaged, drivers particularly video drivers but it
are other causes.You can do without if needed fail or the Vista DVD or recovery command prompt mode
Options if your system was installed by the manufacturer.This tells you how to access the System Recovery Options and/or a Vista DVD
http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspxYou can try a system restore to a point before the problem started when one exists.
How to make a Vista system restore
http://www.Vistax64.com/tutorials/76905-System-Restore-how.html-------------------------------------------------------------------------
Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN
Enter this at the command prompt - sfc/scannow
How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
generates in Windows Vista cbs.log
http://support.Microsoft.com/kb/928228The log can give you the answer if there is a corrupted driver. (Says not all possible
driver problems).Also run CheckDisk, so we cannot exclude as much as possible of the corruption.
How to run the check disk at startup in Vista
http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html-------------------------------------------------------------------------
Often drivers up-to-date will help, usually video, sound, network card (NIC), WiFi, part 3
keyboard and mouse, as well as of other major device drivers.Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htmHow to install a device driver in Vista Device Manager
http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.htmlHow to disable automatic driver Installation in Windows Vista - drivers
http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx-------------------------------------------------------------------------
How to fix BlueScreen (STOP) errors that cause Windows Vista to shut down or restart
quit unexpectedly
http://support.Microsoft.com/kb/958233Troubleshooting, STOP error blue screen Vista
http://www.chicagotech.NET/Vista/vistabluescreen.htmUnderstanding and decoding BSOD (blue screen of death) Messages
http://www.Taranfx.com/blog/?p=692Windows - troubleshooting blue screen errors
http://KB.wisc.edu/page.php?id=7033-------------------------------------------------------------------------
In some cases, it may be necessary.
The Options or Vista recovery disk Startup Repair
How to do a startup repair
http://www.Vistax64.com/tutorials/91467-startup-repair.htmlThis tells you how to access the System Recovery Options and/or a Vista DVD
http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspxI hope this helps.
Rob - bicycle - Mark Twain said it is good. -
How to get back my data for the health and the watch Apps once I've restored my phone?
How to get back my data for the health and the watch Apps once I've restored my phone?
From the backup, you're going to be restoration.
If you back up to iTunes, make sure that it is an encrypted backup.
-
How to add a new language to the language and region of the Panel
Hello
Setting preferences in Mac OS X, I could ' t help noticing the huge amount of languages available in the Mac OS X El Capitan. Located in same languages like Klingon, Navajo and Latin - and of course, this looks like a great tribute to the rich diversity of languages in humanity. However, Mac OS X El Capitan still missing a language - my own. How can I add another language to the language and region of the Panel? How Klingon and Latin is?
Of course, I have this Internet search, but nine out of ten results were some tutorials explaining how to add an EXISTING language to the ones I already have.Thank you.
Rui Valente
You just 'Add' a language. You would have to edit all applications to create strings of replacement for all menus, dialog messages, buttons, etc., that it doesn't translate from one language to the other. Each application has a list of strings mapped to the display string for each supported language. The localized string replaces the generic string in the user interface element.
You can try to contact Apple and volunteer to locate the operating system, they would have confidence in you (unlikely) or hire a person to validate your work.
-
HP Deskjet 1000 J110 series how to print on both sides of the paper and staple Yes to change?
HP Deskjet 1000 J110 series how to print on both sides of the paper and staple Yes to change? I looked everywhere I can think of. You are my last resort.
Windows 7 ~ 64-bit
Hello
Unfortunately, this printer does NOT support duplexing (printing on both sides):
http://support.HP.com/us-en/document/c02231304
Kind regards.
-
When I put the time, she can use the internet, she changes the time on the computer and returns on the internet. What can I do?
Not enough information. You have provided no context. You don't say what version of Windows you are using and you don't really describe the situation in many details. Reading between the lines, it looks like you have a child who has time on the Internet you want to limit. You do not tell us what tools you use to control this limit online, so it is difficult to recommend the right forum for your post. Please update your message with a more detailed description of what is happening and what you want to do.
One thing that comes to mind is using Live Parental control with a Netgear router. See http://www.netgear.com/lpc. LPC uses the service OpenDNS (http://www.opendns.com/)
-
How can I add my laptop to the network and connect to the internet as well
I have internet access on my computer at home, the ipod, the ipad and iphone. How can I add my laptop to the network and connect to the internet as well?
Hello
I suggest you to refer to the following Microsoft article and check if it helps.
Add a device or computer to a network:
http://Windows.Microsoft.com/en-us/Windows-Vista/add-a-device-or-computer-to-a-network
For more information, see the following Microsoft article.
http://Windows.Microsoft.com/en-us/Windows-Vista/setting-up-a-home-network
http://Windows.Microsoft.com/en-us/Windows-Vista/what-you-need-to-set-up-a-home-network
http://Windows.Microsoft.com/en-us/Windows/explore/home-networking
Hope the information is useful.
-
could you please tell me how to start to make flowers for the party and is the best soft
could you please tell me how to start to make flowers for the party and is the best soft
I've never done this, then go to desktop applications Adobe Creative Cloud | Adobe Creative Cloud and click on programs to read a description of what each program does
-
How can I save my picture for the web and devices?
How can I save my picture for the web and devices?
I can't find the option when I want to save the image
Hi jacquelineb,
What version of Photoshop are you using?
If you are using the latest version of CC, please consult export images Adobe Photoshop for mobile and web. Tutorials Photoshop Adobe CC
Let us know if that helps.
Kind regards
Assani
-
I tried, on and off for three days download Lightroom 5 I bought in good faith a price of commercial version free. I tried at various times of the night and usually do about 30% downloaded once getting to 99% with 1 sec each time of seven or eight tests, it had frozen. I bought this product in good faith. I had a very expensive (bought only three months ago) PC Windows 7 with water and huge hard drives cooling system with more RAM than anyone I know not. It is not good enough. When I read your solutions for my problem, I read on the things written in the words I don't understand. All I want is Lightroom 5 I won't learn all this from gobble *... I'm nearly seventy eight years... I don't have three days to mess around with your exhaust system to provide me with a product I want to use today.
Installation errors can have all sorts of causes that should not necessarily be attributed to the material. Have you followed the standard procedures turn off security tools that may interfere? If not find newspapers install could clarify things.
The problems with the Setup logs. CS5, CS5.5, CS6, CC
Mylenium
-
tests of the device for the time of the ASM and Network Protocol (NTP)
Hi all.
I try to install Infratruction grid Oracle 11 g R2 amd oracle Linux OS but
I got the following error.
tests of the device for the time of the ASM and Network Protocol (NTP)
can someone guide me what should I do for them?in RAC 11 GR 2, the option to synchronize the time between the nodes are ntp or ctss.
If you want to use ntp add the - x option in/etc/sysconfig/ntpd (for example OPTIONS = "-u ntp:ntp Pei /var/run/ntpd.pid x")
Hope this helps
-
Need to calculate average start time
Hello
Someone at - it an example of how to calculate the start time medium for a range of dates? I essentially have to evaluate a column date (including time) and to determine, on a specific time period, the average start for a process time given each day.
Any help is greatly appreciated.
Thank you
ChristineHello.
Here is a way.
WITH data AS ( SELECT TO_DATE('2012-01-01 10:30:10','YYYY-MM-DD HH24:MI:SS') start_datetime FROM DUAL UNION SELECT TO_DATE('2012-01-02 10:28:20','YYYY-MM-DD HH24:MI:SS') start_datetime FROM DUAL UNION SELECT TO_DATE('2012-01-03 10:40:30','YYYY-MM-DD HH24:MI:SS') start_datetime FROM DUAL UNION SELECT TO_DATE('2012-01-04 10:17:20','YYYY-MM-DD HH24:MI:SS') start_datetime FROM DUAL UNION SELECT TO_DATE('2012-01-05 10:32:50','YYYY-MM-DD HH24:MI:SS') start_datetime FROM DUAL ) SELECT TO_CHAR(TO_DATE('2012-01-01','YYYY-MM-DD')+AVG(start_datetime-TRUNC(start_datetime)),'HH24:MI:SS') avg_start_time FROM data; AVG_START_TIME -------------- 10:29:50
I hope this helps.
Kind regards.
Maybe you are looking for
-
Is it possible to connect Thunderbolt display MacBook?
Is it possible to connect Thunderbolt display MacBook?
-
Basic Test Lab Configuration Guides: Windows Server
Dear all I'm asking for help for the following We have just a lab Cisco isolated from our network, we have 5 students and I want to help them with establishment of a laboratory to test in a virtual environment, the goal is to teach them how to create
-
Infinite system restarts after the interruption of critical update
HelloI have windows vista and after having worked on my pc (write an email), my computer is automatically restarted because of a windows update (one of these auto restart after that 5 minutes if I don't cancel) However, whenever he hits the stage 3 3
-
I forgot the password question and security for MSN.
When msn has changed, I was on someone's account. Easy to get on and now the passwards guestions or security works. All contacts and e-mail required. hope im not ground
-
Compac mini CQ10 Password verification failed fatal error... System stopped.CNU00926QRI need help to solve the trouble of my mini notebook.