Help for writing an analytical application

Hi all

This is my first question, please be patient with my English, I'm Italian and do not write in a foreign language. ^_^

I have a 'simple' with a large table problem.

My table is really simple

CREATE TABLE HH24

(

ACR VARCHAR2 (50 BYTE) NOT NULL,

IDENTIFICATION NUMBER NOT NULL,

DATAORA DATE NOT NULL,

E0 NUMBER DEFAULT 0 NOT NULL,

C0 NUMBER 0 NOT NULL DEFAULT,

BY DEFAULT 0 NOT NULL NUMBER B0

)

It is large (> 50 GB) and partitioned on column DATAORA

Now I need to extract a set of well defined data

In a range of Data1 to data2 where data1 and data2 are ' dd/mm/yyyy hh24.

sum of the E0 and B0 and C0 value for each day of the time range

So, if I

Data1 = to_date (January 7, 2015 07:00 ',' dd/mm/yyyy hh24 ')

data2 = to_date (July 31, 2015 11:00 ',' dd/mm/yyyy hh24 ')

I need an aggregation where a thake every day in the range from 07-11

rank 1-> 07/01/2015 beetween 07:00 and 11:00

Row 2-> 07/02/2015 beetween 07:00 and 11:00

rank 3-> 07/03/2015 beetween 07:00 and 11:00

...

line n-> 31/07/2015 beetween 07:00 and 11:00

of course, I write a first step request to extract the sum, like this

SELECT cab, id,

SUM (c0) c0,

SUM (e0) e0,

SUM (b0) b0

FROM (SELECT hh24.acr, hh24.id,

HH24. C0 c0,

HH24. E0 e0,

HH24. B0 b0

OF hh24

WHERE hh24.acr =: nameacr

AND hh24.dataora > = data1

AND hh24.dataora < = data2)

GROUP BY cab, id

It works to gather data in an extraction of the day (00:00 to 23:59)

Can someone help me to retrieve data only in the necessary time slot?

P.S. obiouvsly problem is'n in the size of the table (or in my bad English, it's another problem)

^__^

Thank you

It won't be quick, but try something like this (note that it is not necessary for online viewing):

SELECT cab, id,

SUM (c0) c0,

SUM (e0) e0,

SUM (b0) b0

OF hh24

WHERE hh24.acr =: nameacr

AND hh24.dataora > = data1

AND hh24.dataora<=>

AND TO_CHAR(hh24.dataora,'HH24:MI:SS') BETWEEN TO_CHAR(data1,'HH24:MI:SS') AND TO_CHAR(data2,'HH24:MI:SS')

GROUP BY cab, id

Tags: Database

Similar Questions

  • Need help writing an analytical application

    It's the query I wrote

    SELECT
    FISCAL_YEAR_DESC,
    DECODE (FISCAL_YEAR_DESC, 'AD_CFY', (SELECT SUM (AD_MEMO_CREDITS_CFY) OF PC_B), 0) TOTAL_MEMO_CREDIT_CFY,
    DECODE (FISCAL_YEAR_DESC, 'AD_CFY_1', (SELECT SUM (AD_MEMO_CREDITS_CFY_1) OF PC_B), 0) TOTAL_MEMO_CREDIT_CFY_1,
    DECODE (FISCAL_YEAR_DESC, 'AD_CFY_2', (SELECT SUM (AD_MEMO_CREDITS_CFY_2) OF PC_B), 0) TOTAL_MEMO_CREDIT_CFY_2,
    DECODE (FISCAL_YEAR_DESC, 'AD_CFY_3', (SELECT SUM (AD_MEMO_CREDITS_CFY_3) OF PC_B), 0) TOTAL_MEMO_CREDIT_CFY_3,
    DECODE (FISCAL_YEAR_DESC, 'AD_CFY_4', (SELECT SUM (AD_MEMO_CREDITS_CFY_4) OF PC_B), 0) TOTAL_MEMO_CREDIT_CFY_4,

    case
    When FISCAL_YEAR_DESC = "AD_CFY" then AD_CFY
    When FISCAL_YEAR_DESC = "AD_CFY_1" then AD_CFY_1
    When FISCAL_YEAR_DESC = "AD_CFY_2" then AD_CFY_2
    When FISCAL_YEAR_DESC = "AD_CFY_3" then AD_CFY_3
    When FISCAL_YEAR_DESC = "AD_CFY_4" then AD_CFY_4



    end as FISCAL_YEAR
    Of
    (
    SELECT DISTINCT
    rotate. FISCAL_YEAR_DESC,
    AD_CFY,
    AD_CFY_1,
    AD_CFY_2,
    AD_CFY_3,
    AD_CFY_4


    Of
    PC_B
    CROSS JOIN
    (
    Select 'AD_CFY' as double FISCAL_YEAR_DESC
    UNION ALL
    Select 'AD_CFY_1' as double FISCAL_YEAR_DESC
    UNION ALL
    Select 'AD_CFY_2' as double FISCAL_YEAR_DESC
    UNION ALL
    Select 'AD_CFY_3' as double FISCAL_YEAR_DESC
    UNION ALL
    Select 'AD_CFY_4' as double FISCAL_YEAR_DESC

    ) rotate
    ) ORDER BY DESC FISCAL_YEAR


    The data comes in the following way:



    AD_CFY 3118820.3 0 0 0 0 2010
    AD_CFY_1 0 1807161,6 0 0 0 2009
    AD_CFY_2 0 0 0 633290,87 0 2008
    AD_CFY_3 0 0 0 0 3572727.15 2007
    AD_CFY_4 0 0 0 0 8641983.78 2006



    I need to go out in this way as a cube:

    AD_CFY 2010 3118820.3
    AD_CFY_1 2009 1807161.6
    AD_CFY_2 2008 633290.87
    AD_CFY_3 2007 3572727.15
    AD_CFY_4 2006 8641983.78

    Any help is appreciated,

    Kind regards

    Kelly

    Without sample data and structures of tables, it is difficult to find the best solution in any case

    SELECT FISCAL_YEAR_DESC,
           DECODE(FISCAL_YEAR_DESC,
                  'AD_CFY', (SELECT SUM(AD_MEMO_CREDITS_CFY) FROM PC_B),
                  'AD_CFY_1', (SELECT SUM(AD_MEMO_CREDITS_CFY_1) FROM PC_B),
                  'AD_CFY_2', (SELECT SUM(AD_MEMO_CREDITS_CFY_2) FROM PC_B),
                  'AD_CFY_3', (SELECT SUM(AD_MEMO_CREDITS_CFY_3) FROM PC_B),
                  'AD_CFY_4', (SELECT SUM(AD_MEMO_CREDITS_CFY_4) FROM PC_B)
                  ) TOTAL,
          case when FISCAL_YEAR_DESC = 'AD_CFY' then AD_CFY
               when FISCAL_YEAR_DESC = 'AD_CFY_1' then AD_CFY_1
               when FISCAL_YEAR_DESC = 'AD_CFY_2' then AD_CFY_2
               when FISCAL_YEAR_DESC = 'AD_CFY_3' then AD_CFY_3
               when FISCAL_YEAR_DESC = 'AD_CFY_4' then AD_CFY_4
          end as FISCAL_YEAR
      FROM (SELECT DISTINCT pivoter.FISCAL_YEAR_DESC, AD_CFY, AD_CFY_1, AD_CFY_2, AD_CFY_3, AD_CFY_4
              FROM PC_B CROSS JOIN (select 'AD_CFY' as FISCAL_YEAR_DESC from dual
                                    UNION ALL
                                    select 'AD_CFY_1' as FISCAL_YEAR_DESC from dual
                                    UNION ALL
                                    select 'AD_CFY_2' as FISCAL_YEAR_DESC from dual
                                    UNION ALL
                                    select 'AD_CFY_3' as FISCAL_YEAR_DESC from dual
                                    UNION ALL
                                    select 'AD_CFY_4' as FISCAL_YEAR_DESC from dual) pivoter
            ) ORDER BY FISCAL_YEAR DESC
    

    Max
    http://oracleitalia.WordPress.com

    Published by: Massimo Ruocchio, February 20, 2010 12:00 AM
    Changed the TOTAL formula

  • Help for building stand-alone application

    Hello

    Sorry for my English!

    I have to build a .exe from my main VI: the main vi contains some dynamic vi that I need to insert them into a school of my main vi for this I use a parent pah "path.vi of the Application Directory" to create references and when I run my

    application all work very well in machine mouthwash. But when I try to compile this application to create a .exe this exe does not 100% in my target machine. So I do not know that the problem is due to the creation of application normally settings the

    dynamic VI should be in the same directory of application.exe I think I introduced manually but I can't do all this help please!

    In the project window, move the VI out of dependencies and set up in the project.  When you open the App generator, VI should then appear in the list of project files (just like the other 2 files).  Then, you can use the arrow to move to the list always included.

  • Implementing context-sensitive help for WebHelp in web application.

    Hello

    I'm working on a help system for a web application. It will include context sensitive help triggered by an icon on the screen, and the subject is open in an iframe with a defined size. The developer has already implemented the iframe that appears when you click on the icons. It gives me the ID for the screens with the help of the icons as a java full qualified file name. I'm not sure what would be the correct process in RoboHelp to map the ID's for the subjects.

    1. can I create a map file using the list of the IDS of the developer send me? Would it not be in this format:

    #define Field_Name Java_File_Name

    2. I don't then add the ID to the help topic appropriate using pod folder contextual help in setting up a project?

    3. when I generate the layout I specify the map file I created above (.h extension)

    3. If the developer already put in place the size of the iFrame, is it correct that I don't need to create a custom window to configure size? Is it possible to put so two open shutters? (I think using the method above a pane opens with the link to the navigation pane)

    Thanks in advance,

    Joanne

    Hello

    Check the project configuration > context sensitive help > map files. You can assign IDS the developer send you to topics. If you want to play with the mapping files, you must create mapping files (.h) and the alias file (.ali). Just assign a unique ID to a topic and open these files with Notepad to see how you should format these files.

    Take a bow

    Willam

  • Help for writing an extension for SQL Developer

    Hi all
    I want to write an extension for SQL using JDeveloper and Oracle Extension SDK developer and I have a few questions.
    (1) is there some imports I need to sign up for the use of certain classes for SQL Developer?
    (2) how can I do a new item from the context menu in the area of connections in the left?
    (3) is there an example for this, because I have read a few posts of Sue and Kris Rice, but I figured out how to make the extensions only for JDeveloper.

    Thanks in advance!

    SQL Developer Connection browser uses a different site from the JDeveloper Application browser id. The site id OK to use for a listener from context menu is "db_nav". If your listener statement would look like this:


         
              My.listener.Class
         

    Note that a listener can be registered on several sites (if, for example, you wanted as your listener to trigger for publishers, you can use "db_nav; Editor"for the site id.

    You can post questions on the development of SQL Developer extensions on the developer forum SQL: SQL Developer this forum is monitored by the staff of SQL Developer.

    -John McGinnis
    SQL development team

    Published by: John Mcginnis, August 22, 2011 11:34

    Published by: John Mcginnis, August 22, 2011 11:36

  • Seek help for writing a script

    Hello

    I made a form (with Adobe Acrobat Reader 9 Pro), I want to improve the way to display the data entered

    I did a screen capture which summarize the changes wanted.

    (1) I would like to be able to select the short date and display it like this: (jj/mm/aaaa)

    ( 2), I tried a script, but the field in the result column is always equal to 1 when nothing were entered in C1

    var a = this.getField ("result");

    h.Value = 0;

    var b = this.getField ("ValeurB");

    var c = this.getField ("make");

    a.Value = (b.value - c.value) + 1;

    (3) I have always (with my fingers lol) the elapsed time between the date started and finished, it is possible to write a script?

    (I've never used JavaScript before, this is my first experience)

    Thanks in advance for your help.

    english picture.jpg

    For the calculation of the #2, you can use the custom calculation script next to the field "result":

    // Custom Calculate script
    (function () {
    
        var b = getField("ValeurB").valueAsString;
        var c = getField("ValeurA").valueAsString;
    
        // Only perform the calculation if both fields have an entry
        if (b && c) {
    
            // Convert the string values to numbers
            b = +b;
            c = +c;
    
            // Set this field value
            event.value = b - c + 1;
    
        } else {
            event.value = 0;
        }
    
    })();
    
  • Help for writing a mathematical function

    Hello again,

    I work on a tile game and need to understand an equation... I have a 12 x 11 grid... When I place a tile, I need to check for the existence of other tiles on the same row and column and sum their values...

    I need to create an equation with the following variables: -.

    Gets a number between 1 and 132: -.

    divides or multiplies the number in all the possible divisions of 12 between 1 and 132

    Adds or subtracts the correct amount of tiles that are either dependent on its position

    (I stretched the grid and, for example, tile 66 has five tiles on each side, tile 121 a 11 to it is because it is in the lower left corner)

    Hope this makes some sense to someone... I am now starting work on it, but any help would be appreciated!

    Thank you

    Martin

    F1 will return a 2d array.  the first element of array contains all members of rank and 2nd of all the members of the column.

    Function f1(n:int):Array {}
    var m:int = n - 1;
    var row:int = Math.floor (m/12);
    var col: int = %(row*12) m;
    var rowA:Array = [];
    var colA: Array = [];
    for (var i: int = 0; i<12; i+)="">
    rowA.push (row * 12 + i + 1);
    If (i<11)>
    colA.push(col+i*12+1);
    }
    }
    return [rowA, colA];
    }

  • Need your help for writing query complex!

    Kindly give me your suggestion to write a query for some situation...

    suupose he is 10 in a circle Distributor. and also in each Distributor, there are 10 FOS under each Distributor... and to each FSO, there are also numbers retailers...

    Please suggest how to write the query, there look like... (possible may through XML...

    Distributor1, FOS1, rt_count, FOS2, rt_count, FOS3, rt_count
    Distributor2, FOS1, rt_count, FOS2, rt_count, FOS3, rt_count
    ...
    ...
    ...
    8751090151, 8751090147:10, 8751090148:25, 8751090149:11... .etc


    Here it is the data...

    date_crt dist_msisdn f os_msisdn rt_count
    26 MARCH 13 7399998263 7399998263 1
    26 MARCH 13 8751090151 8751090147 10
    26 MARCH 13 8751090151 8751090148 25
    26 MARCH 13 8751090151 8751090149 11
    26 MARCH 13 8751090151 8751090151 1
    26 MARCH 13 8751090151 8751090152 40
    26 MARCH 13 8751090151 8751090326 11
    26 MARCH 13 8751090151 8751090327 70
    26 MARCH 13 8751090151 8751090328 29
    26 MARCH 13 8751090151 8751090335 1
    26 MARCH 13 8751090151 9577162731 8
    26 MARCH 13 8751090151 9613381589 38
    26 MARCH 13 8751090151 9613381790 14
    26 MARCH 13 8751090151 9613381969 13
    26 MARCH 13 8751090151 9613385207 42
    26 MARCH 13 8751090151 9613385284 12
    26 MARCH 13 8751090151 9613386523 52
    26 MARCH 13 8751090151 9613389220 91
    26 MARCH 13 8751090151 9613530655 1

    Published by: user3558544 on 1 April 2013 05:36

    Published by: user3558544 on 1 April 2013 07:09

    You can validate the query in the exactly the way you are runnin it and the text of the error?

    The query with the name of the table that you post could look like this:

    Select dist_msisdn, rtrim (xmlagg (xmlelement (e, os_msisdn |': ' | rt_count |))) ",") stopped by os_msisdn |': ' | (rt_count) .extract ('/ / text()'), ',') combinatoria_b
    of LBA_ALERT
    Dist_msisdn group

  • Help for writing a loop

    Hello

    Can someone show me please how to change this code in a loop. At this point, it is only 10 but could be later if I wanted to learn the right way.

    _level0. Copy1.unloadMovie ();

    _level0.copy2.unloadMovie ();

    _level0.copy3.unloadMovie ();

    _level0.copy4.unloadMovie ();

    _level0.copy5.unloadMovie ();

    _level0.copy6.unloadMovie ();

    _level0.copy7.unloadMovie ();

    _level0.copy8.unloadMovie ();

    _level0.copy9.unloadMovie ();

    _level0.copy10.unloadMovie ();

    I tried this, but it did not work:

    xvar = 0;
    While (xvar < 11)
    {
    Yvar = "_level0.copy" + xvar

    yvar.unloadMovie ();

    xvar = xvar + 1;
    }

    Thank you

    Try...

    for (i = 1; i<11;>

    _level0 ["Copy" + i] .unloadMovie ();

    }

  • Help for writing xml

    Hi all
    I want to write an application of cfm to manage mp3 files by editing the ASX file, which is an xml-formatted file, as below:
    < version ASX = "3.0" >
    < Entry >
    Enya < TITLE > < /title >
    "< ref href =" http://www.xxx.com/mp3/enya.mp3 "/ > "
    < / Entry >
    < Entry >
    love < TITLE > < /title >
    "< ref href =" http://www.xxx.com/mp3/love.mp3 "/ > "
    < / Entry >
    < / ASX >
    but when I edit the ASX file and write to the server, coldfusion adds a line <? XML version = "1.0" encoding = "utf-8"? > to the header of the ASX file and Microsoft Media Player can analyze it, how can I write an ASX file or XML file without the line <? XML version = "1.0" encoding = "gb2312"? > to the header of the file?

    David
    Thank you very much.

    OK, I did it. Thank you all.

  • Cannot install itunes for windows - error: Apple Application Support is required to run Itunes Helper. Uninstall and reinstall (as I did twice)

    Cannot install itunes for windows - error: Apple Application Support is required to run Itunes Helper. Uninstall and reinstall (as I did twice)

    For general advice, see troubleshooting problems with iTunes for Windows updates.

    The steps described in the second case are a guide to remove everything related to iTunes and then rebuild what is often a good starting point, unless the symptoms indicate a more specific approach.

    Review the other boxes and other support documents list to the bottom of the page, in case one of them applies.

    More information area has direct links with the current and recent buildings if you have problems to download, must revert to an older version or want to try the version of iTunes for Windows (64-bit-for old video cards) as a workaround for problems with installation or operation, or compatibility with QuickTime software or a third party.

    Backups of your library and device should be affected by these measures but there are links to backup and recovery advice there.

    TT2

  • Adding a context-sensitive help for an Application

    Hi all:

    I was charged with the responsibility to determine if we can add context-sensitive help to demand of our company which is located on the BlackBerry platform.

    Is there a way to create and integrate existing help with BlackBerry online help pages. In Nokia's Symbian-based smartphones, you can create a help for your application and integrate it with the help of Nokia online; a new subfolder is added to the directory of existing aid.

    A similar feature is available on the BlackBerry platform? Is there an API that allows us to integrate our online help with the BlackBerry online help? Otherwise, what is the alternative to create an online help for a custom application?

    Any help/pointers would be much appreciated.

    Thank you
    Assani

    Application of standard help Blackberry cannot be changed. And it is not possible to add/modify the contents of the application.

    Implement your system by yourself.

    For example - as a set of text/html files embedded into your application locally on the web server.

  • I downloaded the latest version of the DNG Converter Camera Raw version 9.1.1 for windows. However, I get error install the update saying "error opening file for writing. Also on my help menu updates is not active?

    I downloaded the latest version of the DNG Converter Camera Raw version 9.1.1 for windows. However, I get error install the update saying "error opening file for writing. Also on my help menu updates is not active?

    If the installation program itself fails to open and run. Download it again maybe your current download is corrupted. Also, what OS you are using and you are an administrator with permission to install.

  • Safari opens the help file for Messages of the application in opening

    I hope someone can help, it's driving me crazy!

    Everytime I open Safari after the reboot, a page opens with the 'Ayuda de messages' text and nothing else. The address in the address bar is ces/es.lproj/index.html file:///Applications/Messages.app/Contents/Resources/iChat.help/Contents/Resour pointing to a help file in the Messages application. I opened the package and I tried to delete this file as an experiment, but he says that it is a system file and cannot be deleted.

    Does anyone know how to find out what is the cause and stop it? And no, my home page is not defined at this address

    Thanks in advance!

    OS X v 10.11.6, Safari 9.1.2, 9.2 Messages

    Quit and restart Safari while holding down the SHIFT key.

    Go?

  • Different help for different Web Site areas

    I am facing a big enough task to work. Here's the scenario: there is a web site (AKA the parent domain) parent who is using the Site. The web site parent has several subsites (subdomains). Each of those subsites need to have their own help, which may be different from using the Site displayed in the site parent, but still need to use the same source files and output. Creating different projects for each subdomain is not an acceptable option for several reasons. We must be able to 'turn on' and 'disable' visibility in selected pages and information on the selected pages.

    How can this be accomplished without generating (and the maintenance of separate projects) for each subdomain?

    Example usage: using the Site for the website parent has three help pages to create a survey - 1) seizure of analytical data, 2) download the survey and 3) edition of the survey. On the Edit poll page, there are 5 fields containing information that the user can change. Site Help for the subdomain of the web site parent may just have two of the help pages - enter summary information and edit (no download page of the survey) survey. Also, on the edit poll page, only 3 of the 5 fields can be changed - the other 2 fields must not be displayed using the Site for the subdomain.

    How can I use the same Site Help for the web site parent and the subdomain (i.e. use the same source files and output files), but hide the loading survey page and hide the 2 of the 5 fields on the edit poll page in aid of the Site for only the subdomain? I already thought about the use of conditional compilation tags, but it seems to me that this would require generating different projects (for example, different output files) and I doubt that it will be an acceptable solution for our needs.

    Thanks in advance to anyone who can help me.

    Your product "structure" reminds me of product from my client. Four years ago, it was similar to your description. Today, it has evolved and applications 'tailor-made' are based on a basic application, but EVERYTHING is kept separate until subdirectories for each topic within the app. Even my help reflects this subdirectory of application and the file naming convention. This makes it much easier to keep track of all of the project for a client gave (the 18 500 files for my client).

    If possible, to manage the aid project in pieces. Due to the structure of the domain (subdirectory) void help right from the start. The only place where it gets referenced is in the Site Help links and this is better managed as projects merged, as suggested by Peter Grainge.

    The 'core' Help is that you create and provide to the developers of project. Don't forget to provide a detailed list of the names, titles, functions, etc., and instructions on how to import basic assistance in a new project to help customize for customer. With this approach, you need separate directories of project on your servers as each project custom generated help will have common file names but different content. The positive side to this is easy using the Site maintenance when a subproject of field is updated.

    So how is your architect approaching the application? Do you use a container (common) window with other frames, fields, or combination of the two, which are populated based on a previous selection? Or y at - it a unique window based on a previous selection? How aid is requested in GUI - a help button / icon, hotkey - the call triggers a JavaScript written to your application toolbar? You use the simple call to RoboHelp style or is it suitable for reading the file name of the displayed content window? Could use a lot more information to help set up an approach.

    I think you have a lot to plan in advance and more than one session of stop in the head with the developers. Good luck!

    Kind regards
    GEWB
    (been there, done that... got the bruises to prove it)

Maybe you are looking for

  • BSOD error Stop: 0x0000001e

    Hello, since last week, I get a blue screen with the error number in the subject. It seems to trigger any time I have an internet browser (Firefox, Chrome and explore all did this) open and another program tries to open a new tab or window in them. I

  • MacBook Pro Late 2011 Lion slow after new mem SSD and 16G

    I'm under Lion (10.7.5) on a MBP late 2011. Replaced the original 750 GB HDD with a 1 to Samsung SSD 850 EVO and store Crucial 2x8G; to replace the battery with one of Lizone. (Restore own Internet) installation of Lion on the SSD in an external encl

  • UNABLE to get the drive letter of the disk 0 Partition 1

    Hello world. Well, yesterday I tried to install Ubuntu netbook edition 10.10. Well, in the middle of something was wrong and it corrupted the Windows partition. Linux is installed, but Windows is damaged. I'm on a Gateway laptop, and I have a recover

  • Microsoft Visual C++ Runtime Library Error - r6025 Assertion

    I m playing game Terrorist Takedown - Covert Operations Microsoft Visual C++ Runtime Library Error - r6025 Assertion

  • Can't get into my laptop!

    A friend tried to download a 2010 peak performance, I said no because I bought AVG. I went to restore to an earlier date and now I get message from hotfix.exe is not found. After hitting Ctrl Alt end to end to all the program I have is a blank screen