I posted question but still haven't got problem solved, please help
I have a table which has two columes
time- timestamp
value- integer
I have problem writing query to get rolling up cumulative of value for time buckets
Wanted results like following:
like cumulative value for rolling 5 minutes time bucket for past 1 hour
If current time is 8:51:00
value cumulative value
8:51:00 3 256
8:46:00 4 253
8:01:00 3 14
7:56:00 6 11
7:51:00 5 5
user want the time bucket can set to 5min, 1 hours, 1 day
and the data can be refreshed every 1 min. Is there some way we can get live rolling time bucket like
if currenct time is 3/18/2006 11:07:23 am, the interval(Time bucket) send to 1 hour. Results like following
count(*) interval interval3
187 88 3/18/2006 10:07:00 AM
280 87 3/18/2006 09:07:00 AM
34 86 3/18/2006 08:07:00 AM
1 mins later. time is 3/18/2006 11:07:23 am. refresh data, the result like
count(*) interval interval3
188 88 3/18/2006 10:08:00 AM
282 87 3/18/2006 09:08:00 AM
36 86 3/18/2006 08:08:00 AM
Is it possible?
Thanks a lot
previous question link
Re: Help about rolling cumulative sum in time bucket
The referenced thread had a much better subject line.
Question can the number of required buckets that are brought back be limited to say 12? If you can limit the result set to a fixed number of buckets then you should be able to just use a group by on a case statement with a little date/time math in it. That is you would be able to calculate the time boundries from the present and then compare the row data timestamps to the boundries.
With a variable number of buckets you would need to find the difference in the desired units (5 min, 1 hour, days ? 24 hours) between the current_timestamp and the oldest timestamp in the data. You would then need to calculate the boundries and compare the data. Doing all this would be more resource intensive than the group by the case test.
HTH -- Mark D Powell --
Similar Messages
-
I tried reinstalling but with to no avail. It worked well until yesterday so I downloaded new ver.5 but still it won't open. :( Please help.
See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
Create a new profile as a test to check if your current profile is causing the problems.<br />
See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting: Make a new profile]]
If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)<br />
See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox -
hello! I cant't access home on my IPad after update 7.1.2 .. I slide to open it but i get an empty screen then it turned off and turn on, but still can't access my IPad, please help!!
I had the same problem but looking at what everyone else said, I simpley slowly started to click on all the tabs in the app store, let them load completely, and then clicked back to the updates afterwards. It worked after a little while
-
i lost my i-phone 4s yesterday night around 7.15 p.m i am keep on trying to reach my number but still the mobile is switched off,please help me how to find it
The only way to locate any lost/stolen iPhone is through Find My Phone or a similar app. However, this requires that Find My Phone be setup/activated, on your phone, before it was lost/stolen. You would then login at iCloud.com & try to locate it. This requires the phone be turned on & have an Internet connection. There is no other way to locate a lost/stolen iPhone. Apple can't/won't help you, nor will your carrier. Report the loss to the Police, your carrier & Insurance company. Change all of your passwords.
-
i forgot my security question and it won't let me buy any songs but whenever i go to manage my apple id it says i need to tell the answers to the security questions but i don't know them someone please help
You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, and filling out and submitting this form.
(96813) -
I try to buy from my iTunes program and I can not buy me a message appears stating that I am the first time Buy and necessary to answer the questions, but I do not remember the answer please help
You are not addressing Apple here we are just users like you.
Security questions
Read this note for information on how to reset the security questions http://support.apple.com/kb/HT5312
This user tip may also help you Security Questions -
ok, so heres my problem . I have this ipod touch 4g and i was updating it to the newst version and the screen turned white i tried connecting it to the computer and nothing i pressed the home and main button but still nothing i dont want to pull it apart or anything but please help what do i do
Let the battery fully drain. After charging for an hour try the reset (both buttons) and restore as necessary.
-
HT201407 iPhone4 Factory Unlocked but still cannot activate thru iTunes. Please help.
hi i have an iPhone4 which is used to locked to USA AT&T. i had it factory unlocked but still wont able to activate it thru itunes. i cant use my phone anymore since i uodated my iOS from 5.1 to 6.0 which updated my baseband to 4.12.02 and now on iOS 6.1.2 my baseband is 4.12.05 my iphone model is MC318 serial number 81025TA2A4S IMEI 012336004063743. i dont know what else i can do. please help.
Generally this is a sign that the iPhone had previously been
hacked/modified/jailbroken and the update relocked it to the
original wireless carrier. If this is the case, only that wireless
carrier can unlock your iPhone. You must contact them to see
if they offer unlocking and if you qualify.
Where did you acquire this iPhone?
What wireless carrier did you use before this problem?
Does the app Cydia appear on your iPhone?
What does it say when you look at Settings=>General=>About=>Carrier?
Most likely your iPhone was not properly unlocked and is now
relocked to AT&T. You must work with AT&T to get it unlocked.
Depending on what method was used to unlock the iPhone previously,
a legitimate unlock from AT&T may not complete successfully.
unlocking AT&T iPhones (thanks to wjosten for the link):
http://www.att.com/esupport/article.jsp?sid=KB414532#fbid=Ont7guWFCdY -
Hi,
I have uploaded an app build for pre release and its still under processing So i uploaded a new build but still the issues is not resolved.
Please help...
ThanksHi smithin,
Thanks for visiting Apple Support Communities.
It sounds like you've submitted an iOS application to the App Store, which is being processed, but there's an unresolved issue.
For additional help with this situation, Apple Developers can use the contact methods on this page:
https://developer.apple.com/contact/
All the best,
Jeremy -
My iphone 4 screen goes black but still rings and eveything else. Please help
I've tried a hard reset but that doesn't work. I was listening to music and went to change the song and my screen wouldn't show. My phone rings and gets texts, but the screen will not show.
do a soft reset, hold the lock and home screen at the same time for 4 seconds, that's what fixed mine and it fixes about 90% of all problems like that on the iPhone
-
I have been using these commands to push Mozilla to client computers and it worked fine so far however now it is not working.
I treid following command however it prompts the user to install/upgrade instead of installing silently.
"Firefox Setup Stub 36.0.exe" -ms /qn /norestart
Please help!!!Hi vparmar,
We recommend installing Firefox in a traditional way to avoid any further problems or conflict with the system. [[How to download and install Firefox on Windows]]
Thank you. -
Problem report for Safari reads: Safari quit unexpectedly while using the coreclr plugin.
Go to /Library/Internet Plug-Ins. If you see the Silverlight.plugin, move it to the Trash.
Now click your Apple icon (top left in your screen) then click Software Update to make sure all your software is up to date.
Restart your Mac if any updates were installed.
Try Safari / Hotmail.
If Safari crashes again, press the Report button on the CrashReporter dialog box to view the crash information.
Copy/paste the entire contents of the Crash Reporter window into your reply. If the crash report dialog does not appear or the crash is hard to reproduce, crash logs can be retrieved from the ~/Library/Logs/CrashReporter> folder. -
iTunes could not connect to this iPhone because an unknown error occurred (0xE800001).
I’m directly connected to the my Laptop USB 3.0 so no USB problem 1 time I upgrade ios 4.1 (8B117) because of this problem but still haven’t good result
anyone please halp me As soon as possible -
I am not able to add videos to itunes. So I am not able to sync them with my IPhone4s.
I ve tried:
dragging to itunes,
minimize file name of mp4,
adding by file/folder, but still not adding.
WHY? Please help.This is very serious. Your computer got infected with ransom malware, Cryptowall.
Go here for further info.
CryptoWall 2.0 Anything Good about Buying you Keys? - General Security
CryptoWall and DECRYPT_INSTRUCTION Ransomware Information Guide and FAQ -
Facebook will not boot up on my iPad but works on my iPhone ?? Please help
MY Facebook app has not been able to boot up on my iPad since Thursday. It works fine on my iPhone but I just get a blank white screen with a blue border across the header. After a few seconds it just goes back to iPad menu. I have deleted an re installed FB app and updated the iPad software but still not joy....please help!!
What iPad and MacBook do you have (mid 2011 ot later iPad 2 or later?) and what OS or iOS do you have? Are they all on same network and apple id with homeshare on?
Maybe you are looking for
-
Palm Desktop "hiding" some of my new events
I've used Palm Desktop for about two years on my old laptop and had no problems. Now that I got a new laptop and couldn't find the intall CD, I had to download the Desktop package off the website (Windows XP Home version). I went to add in new events
-
So iDVD refuses to burn the disc. Up until it tells us to insert a recordable DVD, everything is fine-then when we insert a recordable DVD, it takes it for a few seconds, then spits it back out without any kind of reason whatsoever. Help?
-
I installed CS5.5 Design Premium - can I uninstall CS5?
Hello, I successfully installed CS5.5 Design Premium in my computer but the CS5 version still exists in my drive causing a visual mess. Can I uninstall it? Will it harm my CS5.5 installation? How do I uninstal? Thanks, Juan
-
YUI Menu Help, menu greyed out
Hi, I love the look of YUI Menu, unfortunately, Menu item 2 continues to be greyed out and not functional. I've tried reloading it and still get the same behavior. help??
-
Hello, earlier today I was on the phone to my friend, my dad came home later on saying he had been trying to ring me, whilst I had been on the phone to my friend I had no incoming call things, I tried to sort it out, I went on settings, calling, call