DATE COUNTING

hi friends,
I have issue regarding date, that when I am putting simple values of date the result is correct , when I put the add_months and last_day option result is not correct, any idea?
Regards,
1 SELECT COUNT (MAX(TRAN_DATE)) FROM tablename
2 WHERE TO_DATE(TRAN_DATE) BETWEEN '01-NOV-06' AND '16-NOV-06'
3* GROUP BY TRAN_DATE
SQL> /
COUNT(MAX(TRAN_DATE))
16
Second Query :
1 SELECT COUNT (MAX(TRAN_DATE)) FROM tablename
2 WHERE TO_DATE(TRAN_DATE) BETWEEN add_months(last_day(sysdate),-1)+1
3 AND TO_DATE('16-NOV-06')
4* GROUP BY TRAN_DATE
5 /
COUNT(MAX(TRAN_DATE))
15

The "COUNT(MAX(tran_date)) ... GROUP BY tran_date" construction is rather confusing. Isn't it the same as "COUNT(DISTINCT tran_date)" with no GROUP BY? e.g:
SELECT COUNT(DISTINCT tran_date)
FROM   tablename
WHERE  TO_DATE(tran_date) BETWEEN '01-NOV-06' AND '16-NOV-06';Also, what is TO_DATE(tran_date) supposed to do? And '01-NOV-06' isn't a proper date - you are relying on Oracle to guess the format. It would be better as
SELECT COUNT(DISTINCT tran_date)
FROM   tablename
WHERE  TRUNC(tran_date) BETWEEN DATE '2006-11-01' AND DATE '2006-11-16';or if there is an index you want to use on TRAN_DATE, then
SELECT COUNT(DISTINCT tran_date)
FROM   tablename
WHERE  tran_date >= DATE '2006-11-01'
AND    tran_date <  DATE '2006-11-16';

Similar Messages

  • How do I get my data counter back on my home page

    How do I get my widget for data counter on my home screen

    Depending on the phone you have, the widget will either be in the widgets section of your app drawer, or you'll long-press an empty space on your home screen and then see the widgets folder at the bottom of the screen.  Once you're in the widgets folder, find the widget, long-press it, and drag it to where you want it on the home screen, then let go.

  • Nokia Lumia 900 Data Counter and People Tile

    Is there a data counter on the Lumia 900 that I can't find? I've tried to call the 3282 data number, and it always tells me I'm at 0 even though I know i've been on the data network and not wifi.
    Also, can someone explain to me how much data something like the people tile/email account setup uses? I've never understood apps like that coming from suuper old phones. Is it constantly checking your email/facebook? On some time interval? I'd really like to set up facebook and such with the people tile because it seems really nifty, but I don't want to go over my 2gb plan. I just don't terribly understand how it all works, and i'd be willing to try it out if I could see how much data i'm using..but that goes back to my first question...In the past when checking email/facebook I'd always just use the internet browser on my old Nokia e71x, and it wasn't giving me updates in real time like I know this guy is capable of. I'd like to use it, I just don't wanna eat up my data plan. Thanks for any wise words!
    Solved!
    Go to Solution.

    The email setting can remain always-on and email arrives instantly like a Blackberry if you set the synchronization settings to "as items arrive" for the email setup.  There will also be a very small data usage checking for changes on various Windows Live services such as Calendar for changes so it can sync the data to the phone, or vice versa.
    The People Hub tile uses existing picture thumbnails already stored on the phone from your contacts profile pictures and Twitter and the first profile picture it finds on your friends profile pictures on Facebook.  Once the thumbnails are on the phone it doesnt use any more data.
    It doesnt use any data to check for Facebook or Twitter until you go into the People Hub and swipe the screen into the "Whats New" section then it displays new Twitter and Facebook posts which have happened since you last checked it.  Although if you have set Twitter and Facebook to email you when you receive a mention or interaction and you have your email set to receive messages instantly then you will have realtime alerts for those important things.
    When you swipe to the "All" section of the People Hub and click on your picture it then gives you the option to post a message to Twitter / Facebook or Windows Live all at the same time, or selecting each checkbox for individual social networks if you only want to post a message to one or two not all.  In this section you can also Check-In which places a Bing Maps location of the place you are using the GPS system.  The Messaging system is persistent always-on and displays any contacts that are online on your Facebook chat and Windows Live Messenger if you have set it up, which when you receive a message is text only so uses very little data.

  • Nokia C3-01 Data counter error

    I've updated my C3-01 to v7.51 and it completely messed up with the data counter. Earlier it used to maintain the count even when the data usage was in GB. Now it resets itself after every 1GB. It defeats the purpose of data counter completely as in using 3G, my usage has now gone upto atleast 1 GB/day. And I've already done the usual resets & reinstallations at the user level. This problem was not present in the 7.16 but has come up in 7.51. Please look into this matter. Anyone else with problem is welcome to post his feedback.
    Please mark the post as solution if it solves your problem.
    Current Device - Nokia Lumia 1020/920

    Just restart your phone.

  • Data counter app - x6 ?

    Hi, is there any app that counts data on 3G/GPRS connection for present amd past month?
    Internal data counter keeps only information for last 30days, and when I'm in a middle of month data are mixed, I can't see only data for present month.
    I found some app "data quota" which is pretty stupid app, this app requires manual reset of system data counter at beggining of month to work properly !?! 
    Is there any proper data counter app which is for a change, smart?

    I will answer to myself :-)
    NetQin Mobile Guard can do a lot of stuff, and count data

  • Nokia N95 8GB data counter accuracy + T-Mobile (UK...

    Hi.
    I have the 10GB per month web 'n' walk max package.
    I use the Nokia N95 8GB as a modem for my computer as I do not have a land line.
    I reset the Nokia's data counter (uploaded and downloaded totals) on the 1st of each month.
    Since T-Mobile changed the service about 3 months ago I receive text warnings when I reach 80% of the fair use policy (i.e. 8GB) and a text if I hit 100% (i.e. 10GB). If I hit 10GB I am told that I will still be able to surf but not download at peak times.
    There seems to be a big difference between what T-Mobile claim I have used and what the phone's counter shows. This month, for example, I have received the 80% warning but my phone only shows a total (up & down) of 6.3GB, 1.7GB difference.... quite large I feel! Last month I received a text telling me i had hit 100% but my phone only counted 8GB total.
    When I contacted tech support they checked the system and came up with different figures. The 1st system which I believe is the same one customers can access by logging into t-mobile.co.uk and downloading the unbilled data usage figures gave about 8.7GB total. This system until very recently used to crash if you attempted to download the internet usage and had used a few gigs of data... useful. The support person then checked a second system which gave a total of 9GB. However these two different systems are not the ones that generate the warnings and also the cut-off (or rather reduced surfing restriction) texts. So T-Mobile have at least 3 systems.
    So I have some obvious issues. T-Mobile have now stated that the data counter in the phone will not be that accurate and will miss some data, implying it is to do with counting compressed data rather than uncompressed. I disagree. The phone counter will surely count all 1s and 0s coming through it regardless of what they are. At this point I made the analogy to my electricity supply... the meter is in my house, that is the device by which I and my provider go by. They do not have a meter at the power station end. They bill me for what comes into my house at my front door and not what is sent out. That is the most accurate method for the customer.
    I wonder what Nokia would say if T-Mobile inform customers that their hardware can not add up?
    I believe there is a trading standards issue looming here as I do not believe I am getting what I pay for. At best appears to be 90% use. Whilst it is true they do not cut me off entirely if I exceed the 10GB, they are not letting me even reach that point. I seems similar to the current issues surrounding quoted broadband maximum speeds and actual obtainable speeds.
    So has anyone had similar problems and disagreements about the fair use policy? Does anyone have any information / ideas about the Nokia data counter accuracy?
    I am on the verge of contacting trading standards and any other suitable body about this.
    Many thanks.

    Thanks for replying.
    If you are right, and as you say "I'm guessing", your butcher's analogy seems a good one. I know that the full data packet is not just the actual data but has the header attached (which I think can be up to 60 bytes?) but assumed that only the size of the contents would be counted not the wrapping. I wonder if this is what is actually going on. It would seem extremely unfair if it is especially as it can make a good gigaybte or more difference.
    T-Mobile do not provide a reliable method to keep an eye on what is being used so what chance do I have? I still come back to my electricity supply analogy which I would say is similar to yours. My electricity supplier doesn't charge me for any electrical losses that occur between my front door and the power station (well not obviously anyway).
    T-Mobile don't provide any software if you use the phone as a modem (unlike their web 'n' walk software if you use their USB dongle) and suggest you find software on the net to monitor your usage. However all the software I have tried seems to have limitations as to what type of data it can and can't monitor so is less than accurate and all have crashed at times and lost the running totals. The only accurate tool in my hands seems to be the phone itself.
    Surely the customers shouldn't have to worry about transmission specifics, without those the net wouldn't work at all so how can they be charged for? Customers I guess would only want to pay for the actual data they are using. If I download a 1MB file I only want to pay for 1MB. Will the TV license people start charging extra for digital TV as the data is sent in packets?
    Hmmph!
    Thanks.

  • Data counter for nokia c6-00

    Hello!
    I've recently purchased Nokia C6-00 for my girlfriend, however, she was stunned by the bill she received for data transfer. Could you tell me where in the phone might she find gprs data counter?
    thanks!

    in LOG, there is history of recent call, call duration, and data counter. Normally this data counter keeps record of last 30 days(or one month). You can crosscheck the data tranferred with same bill

  • Data counter glitch?

    Is anyone else having this issue?
    The cellular data counter appears to randomly reset without doing it manually?
    I never had this problem with iOS 5, but iOS6 seems to be glitchy, here is what I mean:
    then:
    Thanks

    Yes... some are having the issue... if you're on Verizon, there is an update specifically to address this issue.

  • Data counter connection active

    a noted stating "data counter connection active" keeps popping up.  what does this mean and how do i stop it?

    05-Jul-2008 07:33 PM
    omro wrote:
    Ah, you mean the red "hang up" button, not the red "power" button.
    The data connections are started by the email client connecting to check the email and not disconnecting after it checks. I wonder why it does that?
    yes, the red hang up button, so the E71 has red power button, hmmm...
    have you tried editing your General Profile to set warning tones off
    you got IMAP on?
    Message Edited by friedbrains on 05-Jul-2008 07:39 PM

  • E71x - "Data counter connector active" Message

    I keep receiving this message which pops up on the screen and beeps once when it does so.  It happens during phone calls and just happened when I hung up.  All it says is, "Data counter connector active".  Could anybody please tell me what this message means?
    Thanks

    -When you are on a voice call, the data counter is off.
    -When you are surfing the web, etc., the data counter is on and if you have anything other than an unlimited data plan, the AT&T meter is running at something like 10 cents per KB.
    The annoying thing is that it is default set to let you know whenever the data counter is available.
    I have unlimited data, and changed one setting which seems to have cut down on the message:
    Menu >> Config >> Connection >> Data Counter >> Data Counter Connection
    Changing it from 'When Available' to 'When needed' seemed to cut down on the messages quite a bit.

  • Annoyed By Data Counter

    Hi, I'm new to this forum, so forgive me if I'm posting this question in the wrong section.  I recently purchased the new Nokia 6790/Surge.  It's my first Nokia phone, so maybe this isn't a new issue, but it is to me.  Every time I make a call, at the beginning of the call I'll get a "beep" and a message saying something about the "data counter being on hold", and as soon as the call is ended I get the "beep" again with another message saying something about the "data counter being active."  Not a huge issue, but personally I find it very annoying.  I have no idea what the data counter is (yes I know the name should be self explanatory), I just know I want it off.  Problem is, the only options I can find for the "data counter" are to use it either "when available", or "when needed". Both settings cause that annoying call interruption.  I see no way to turn it off entirely.  Does anyone know if this is possible?  Or at least fill me in on what exactly it's doing.  Thanks.

    If you asked for traffic counter check this link: http://blackberryfreaks.com/gprs-traffic-monitor.html
    There is a free GPRS traffic counter application

  • N8 Data Counter

    Hello.
    Where I can find the n8 Data Counter, if exists?. I´ve read in many places something like this: " Data Counter: Open call log and tap on right tab to view data transfer log"... but i can´t find "the tap on the right"
    Thanks
    Solved!
    Go to Solution.

    Wap only. S60 V5 had Wifi and Wap but Symbian^3 has only wap. it is logical since you worried about data usage only via wap. you can see the data usage of individual connection by going to all communications tab it will show everything, but again i miss the filter option by selected type of communication  which was available in V5. it is missing since you have no way to select each communication as in V5 (interface logic) 

  • In measurement doc.where to enter as on date counter readings after go live

    Dear All,
    After go live the sap system, user has to start creating the measurement document for counters which as follows.
    Suppose we have go lived on 1st feb 2010, so on that day already physical counter is showing following readings.
    Equipment - Counter - Current readings of meter (as on 1st feb 2010)
    DG Set - Running Hours - 3000
    Boiler - Running Hours - 2400
    Compressor - Running Hours - 3800
    Electricity meter - Units - 5800
    I am little confused about in which field of measurement document i have to enter the above as on date readings (1st feb 2010).
    Those fields are
    Counter reading
    Differnce
    I am also worried, because this is start of creation of measurement document & which makes basis for counter base preventive maintainence of equipment.
    Thanks & Regards,
    Sandeep

    Hi
    First time reading you entre in counter reading filed, then the subsequent daily reading you can entre in counter reading field or difference.
    It means, if you entre counter reading, system automatic calculate the difference (i.e current minus previous reading),
    or if you entre the difference, then system bring the counter reading as difference plus previous reading.
    Check these senerios in Quality and then you can take decision
    S Ramanujam

  • Inbuilt Data Counter Correct Or Wrong?

    I hope people read this and understand correctly, I am with Vodafone Ireland and I have signed up for Free Calls, Texts & 250mb Of Internet. I have never gone over this but yesterday I rang them as I had no credit and their was a 220mb of a download etc now I am allowed 250mb but they said I went over that by 220 which in total is 470mb which I said this is impossible they are saying I will not be refunded and they have taken €87 from me and there seems I can do nothing about it?
    I told them I was not on the internet but they said I was I asked him to go back over the dates since the 7th April and each day the amount of data used was 1mb say each day to the max of 3mb etc so I was trying to let the Supervisor know do you not see a pattern so why of a sudden was their this on my account which is 220mb at 3.24Pm. I am so angry I dont think anyone will understand so I am now writing to the Director of Vodafone, I know IPhone4 sends out data every night etc but 220mb I was even shocked. Here is the question I have the iphone4 since February and the counter is showing 600mb which to me seems normal and this is excluding WiFi but according to Vodafone if you add up when I joined the Free Internet to give me 250Mb which was in March (250mb) April (250mb) with yesterdays over rate of (220mb) gives you a total of 720mb but the whole iPhone itself says 600mb
    How can I prove that I was not on the internet yesterday 5th May 2011 and how on earth can their reccords show more when I have never gone over the allowance before how come yesterday did this file size happen when I was actually driving screen was locked and although their was apps being used before I left the house that was with WiFi and on leaving the house I went back to the homescreen.
    PLEASE HELP!!!

    To those of you who want to add a location to your photos using google earth. There is a plug in that allows you to simply drag and drop the photos from iPhoto to the dock icon of Geotager plug in.
    http://craig.stanton.net.nz/code/geotagger/
    The photos are tagged with the data and you can use them with Places. It is a 2 step process that will allow you to geotag old photos or new ones you rescan. I have even used Geotagger to tag photos that I have scanned in from vacations long ago.
    It is FREE
    You need the latest version of Google earth. I also recommend the crosshairs google earth plug-in
    I plan to get a nikon gp-1 as soon as I can to eliminate this step.

  • Date Count

    I was using MS office 2004 - okay.
    Numbers is slightly different.
    I want to count just days between events (like an invoice) - not hours or minutes etc.
    How can I do this within Numbers?
    There is probably a simple trick - I have not found it yet.
    Cheers in advance

    Clive,
    It's sometimes hard to say what the difference might be in how an expression will work in someone else's environment because we aren't privy to all the conditions. For me, there is no problem using the new Date data type in Numbers'09. I can subtract two fixed dates, a fixed date and a variable date and I can use the TODAY() function within an expression with equal effectiveness. See the function list at the bottom of this screen shot, and note that the entire table is formatted as Automatic.
    If you were to post a similar screen shot we might be able to determine the reason you are having trouble.
    Regards,
    Jerry

Maybe you are looking for

  • Apple Mini-DVI to Video Adapter Questions

    I'm in the processing of producing an instructional video using an Intel Core Duo iMac and iMovie. This content will be distributed primarily via broadcast over cable TV. Considering this, I'd like to be able to edit and view my dv footage on a TV mo

  • A way to display error messages from the program

    Dear all, I am looking forward to display a set of error messages(in a internal table) during the execution of the program to the user. I wanted to know the better way of displaying error messages from my program with more options. Well I tried out u

  • MacBook Pro 2011 & Crucial C300 SSD Drive

    Hi all, I have in the last month bought a new MacBook Pro from the apple store, 17"  Model Identifier:          MacBookPro8,3 I have tried moving my C300 from my old macbook pro but it jsut doesnt work in the MBP.  I have read about 400 sites which s

  • Last Changed On field in User Maintenance

    Is there any possibility to delete last record in Last Changed On field in SU02 transaction? Where is (in what database table) this record stored? Firstly I checked USH2-4-10-12 tables but with no luck, then I discovered that recent changes can be se

  • Oracle date string parser

    I really want that oracle can change their command parser engine to be smart enough especially for date string parsing. currently the engine will throw error when we type a date string as (for example) '10/10/10', while this command can be accepted i