Doubt of logic!

Hi guys,.

I have a little problem to get the output, I tried all kind of possiblities as ranking, rownum etc. What logic should gently used.

Create table c_temp (l_cust_code varchar2 (5), l_bill date, l_invoice varchar2 (30));

Insert into c_temp values ('xx' ', '06 - sep - 2013', ' SA3IN0000004');

Insert into c_temp values ('xx' ', '06 - sep - 2013', ' SA3IN0000006');

Insert into c_temp values ('xx' ', '06 - sep - 2013', ' SA3IN0000011');

Insert into c_temp values ('xx' ', '07 - sep - 2013', ' SA3IN0000048');

Insert into c_temp values ('xx' ', 10-sep-2013 ', ' SA3IN0000504');

Insert into c_temp values ("yy" ', '06 - sep - 2013', ' SS4IN0000104');

Select * from c_temp by 1, 2, 3;

Output of the table:

l_cust_code l_cust_code l_bill
XXSA3IN000000406 sep-2013
XXSA3IN000000606 sep-2013
XXSA3IN000001106 sep-2013
XXSA3IN000004807-sep-2013
XXSA3IN000050410-sep-2013
YYSS4IN000010906 sep-2013

Need output:

Cust_

code

Total Inv Same day total Inv First_inv_of same_date (A) Tot Inv same day except (A) First Same day Inv Tot Inv other same day INV other same dayXX53SA3IN00000042SA3IN0000006, SA3IN00000112SA3IN0000048, SA3IN0000504XY11SS4IN00001090

Thanks in advance!

Concerning

Chandru.B

But as it does not... we may have an answer that use it...

(considering we have not learned the exact logic, so it's just a rough idea...)

SQL > ed
A written file afiedt.buf

1 Select l_cust_code
2, l_bill
3, l_invoice
4, max (decode (l_bill, same_day, total_inv, null)) as total_inv
5, max (decode (l_bill, same_day, total_day, null)) as total_day
6, max (decode (l_bill, same_day, first_inv_same_day, null)) as first_inv_same_day
7, max (decode(l_bill,same_day,total_day-1,null)) as total_day_except_first
8, listagg (decode(rn,1,null,l_invoice), ',') within the Group (order by rn) as inv_same_day
9, max (decode (l_bill, same_day, total_inv-total_day, null)) as total_other_same_day
10, listagg (decode (rn, 1, decode (l_bill, same_day, null, l_invoice), null), ',') in the inv_other_same_day of the Group (order by l_invoice)
11 of)
12. Select l_cust_code, l_bill, l_invoice
13, count (*) on (l_cust_code partition) as total_inv
14, count (*) over (partition l_cust_code, l_bill) as total_day
15, row_number() over (partition l_cust_code, l_bill l_invoice order): the nurse
16, min (l_bill) on (l_cust_code partition) as same_day
17 min (l_invoice) over (partition by order of l_bill l_cust_code, l_invoice) as first_inv_same_day
c_temp 18
19       )
20 * group by l_cust_code
SQL > /.

L_CUS TOTAL_INV FIRST_INV_SAME_ TOTAL_DAY_EXCEPT_FIRST INV_SAME_DAY TOTAL_OTHER_SAME_DAY INV_OTHER_SAME_DAY TOTAL_DAY
----- ---------- ---------- --------------- ---------------------- ------------------------------ -------------------- -------------------------
5-3 SA3IN0000004 2 SA3IN0000006, SA3IN0000011 2 SA3IN0000048, SA3IN0000504 XX
yy             1          1 SS4IN0000104                         0                                                   0

Tags: Database

Similar Questions

  • IllegalArgumentException When config on an enum TimeUnit

    Hello

    Just started using BDB I 4.0.92 on Ubuntu 9.10 x86_64. It configures properly, I see that there is an obvious bug.
    com.example.Test at localhost:33768     
         Thread [main] (Suspended (exception IllegalArgumentException))     
              Enum<E>.valueOf(Class<T>, String) line: 196     
              TimeUnit.valueOf(String) line: 43     
              PropUtil.parseDuration(String) line: 101     
              DurationConfigParam.validateValue(String) line: 52     
              DurationConfigParam(ConfigParam).<init>(String, String, boolean, boolean) line: 62     
              DurationConfigParam.<init>(String, String, String, String, boolean, boolean) line: 34     
              EnvironmentParams.<clinit>() line: 120     
              EnvironmentConfig(EnvironmentMutableConfig).setCacheSize(long) line: 301     
              Example.setup(File, boolean) line: 28     
              Test.main(String[]) line: 358     
    This is the calling code:
    26        EnvironmentConfig envConfig = new EnvironmentConfig();
    27        envConfig.setAllowCreate(!readOnly);
    28        envConfig.setCacheSize(134217728); // 128 x 1024 x 1024
    The error is in the call to validate the value TimeUnit, which is installed here
        public static final DurationConfigParam ENV_BACKGROUND_SLEEP_INTERVAL =
            new DurationConfigParam
                (EnvironmentConfig.ENV_BACKGROUND_SLEEP_INTERVAL,
                                   "1 ms",          // min
                                   null,            // max
                                   "1 ms",          // default
                                   true,            // mutable
                                   false);          // forReplication
    1 'ms' is divided, and when 'ms' are evaluated as an enum TimeUnit that it fails, it should be '1 MILLISECOND"that I see.

    But somehow I doubt my logic because otherwise, there would be a flood of the message here on the forum?

    THX Dave

    The javadoc is here:
    http://www.Oracle.com/technology/documentation/Berkeley-DB/je/Java/COM/Sleepycat/je/EnvironmentConfig.html#timeDuration

    Look at the code in PropUtil, and you will see it is catch the exception and manipulation. Modify the source code is not the solution.

    Something is wrong with your system configuration, but I don't really know what it is. We have never seen an error that you stated.

    I go on vacation now, but someone else will try to help you with this.

    -mark

  • Having doubts about the logical operators and, or.

    I wrote a query as

    Select ename emp where mgr = 7902 or sal = 1600 and employment = "seller."

    The o/p of the above query is

    Ename
    Smith

    I cannot understand the o/p, which he gave to me.

    the table is
    EMPNO, ENAME, JOB HIREDATE DEPTNO COMM SAL MGR
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
    7369 SMITH COMMITTED 7902 17 DECEMBER 20 800 80
    7499 ALLEN 7698 1600 20 FEBRUARY SALESMAN 81 300 30
    7521 WARD 7698 1250 22 FEBRUARY SALESMAN 81 500 30
    7566 JONES MANAGER 7839 2975 2 APRIL 81 20
    7654 MARTIN 7698 28 - SEP - 81 1250 1400 30 SALESMAN
    7698 BLAKE MANAGER 7839 2850 MAY 1, 81 30
    7782 CLARK MANAGER 7839 2450 JUNE 9 81 10
    7788 SCOTT ANALYST 7566 3000 APRIL 19, 87 20
    PRESIDENT OF 7839 17 NOVEMBER KING 81 5000 10
    7844 TURNER 7698 08 - SEP - 81 1500 0 30 SALESMAN
    7876 ADAMS 7788 1100 23 MAY CLERK 87 20

    EMPNO, ENAME, JOB HIREDATE DEPTNO COMM SAL MGR
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
    7900 7698 DECEMBER 3, CLERK JAMES 81 950 30
    7902 7566 3000 3 DECEMBER ANALYST FORD 81 20
    7934 MILLER COMMITTED JANUARY 7782 1300 23 82 10

    Please check again.
    The query is very well.
    I assume you are using version Oracle 11 g and schema scott!

    SQL> ed
    Wrote file afiedt.buf
    
      1* select ename from emp where mgr=7902 or (sal=1600 and job='salesman')
    SQL> /
    
    ENAME
    ----------
    SMITH
    
    SQL>
    

    Thank you!

  • Logic ruined after you have configured the controller Akai. Time Machine will fix it?

    So I am using Komplete Kontrol for over a year. Problems of cero. I have a new MPK261 AKAI and proceeded to set up in the logic, following the instructions on the AKAI website for this (http://www.akaipro.com/kb/article/1600).

    I don't know what the * happened but the logic went crazy after that... the buttons on the controller to make each window I opened just flash and pop up intermittently.

    I'm not really try know what happened (doubt I'll ever find and the AKAI people do not react), my guess is these AKAI placed somehow in conflict with the settings of Komplete Kontrol, and I have replace the file com.apple.logic.pro.cs from the library > Preferences, which also could have been she.

    So, I just want to ask if using Time Machine to settle things a few days back will correct this? I've never used a time Machine (I have defined daily backups, but never had to use before), so I don't know if it will work.

    Thank you!

    Before going to the road Time Machine... (which I do not know the answer anyway)

    Try this:

    With the logic does not--

    Remove the 10 logic preferences file AND the areas of shared control file.

    (In your case, simply remove the control surfaces pref)

    In the Finder, choose go > go to folder from the menu.

    Type ~/Library/Preferences in the field 'go to folder '. (Note :) Type exactly-> ~/Library/Preferences)

    Press the Go button.

    Delete the file com.apple.logic10.plist from the Preferences folder. Note that if you set custom shortcuts, it will reset to the default values. You can export your custom key as a preset before performing this step. See the user manual Pro Logic for more details on how to do it. If you are having problems with a with Logic Pro control surface.

    then delete the file com.apple.logic.pro.cs from the Preferences folder.

    Next time you start logic will be rebuilt the default surface control file.

  • Invisible logical partitions after deleting partition EISA WinRE on satellite

    Hello

    I have a dual boot with pre-installed Vista and XP. So, I got in total 3 primary partitions and 1 scope with logical partitions it contains. I keep Vista on the reserve and only use XP as a boot partition. I wanted to try a third OS but I had reached the maximum of 4 primary partitions on the disk. So I made a backup of and deleted the EISA WinRE partition which was pre-installed with Vista, thinking this would affect only Vista, my only boot is XP.

    I used the XP computer for this management tool. But when I click with the "delete" button right over WinRE and chosen, the score became the unallocated volumes, but also ALL logic on the extended partition, except the first.

    I tried to take over WinRE recovery with Acronis image process, but I have the extended partition still shows only the first volume and no trace of the rest of my data. Obviously, it was a big mistake and WinRE seems to contain more information for Vista recovery.

    How can I return my logical partitions?

    Thanks for any help

    Hmm I doubt you might be abele to restore the WinRE partition once again without use of the Vista CD it seems you completely remove this partition one also all data from the partition.
    I agree with you and it was really a mistake, sorry but I n t see any big chance to get back but maybe someone has another idea.

  • How to create the logical tables &amp; how to give joints according to obiee 11g?

    Hello

    I have again to obiee 11g. I want to create the logical tables in MDB layer.

    After that I want to give joins according to MDB.

    I don't know, how to create the logical tables and how to give joints according to obiee 11g?

    Please help me.

    Thanks in advance,

    A.Kavya

    Hello

    The new logical table is right click on the MDB itself, for the join you generally in the business model diagram (again right click on objects).

    Maybe it's better if you start from a kind of tutorial to at least have an overview of what is happening where (layer business and physical layer etc.).

    Take a look at what Oracle has available: Oracle BI EE 11 g

    And no doubt, it can be a good start: https://apexapps.oracle.com/pls/apex/f?p=44785:24:0:NO:P24_CONTENT_ID, P24_PREV_PAGE:9787, 2

  • DBMS_REDEFINITION "the transaction is in doubt."

    Hi all

    I have a problem with the DBMS_REDEFINITION package. Our application does have a problem. very basically, I just want to a partitioned table. This table is very active, especially inserts and deletes. I create partitined table, that the can_redef_Table procedure to no control, no error when I run the procedures START_REDEF_TABLE or COPY_TABLE_DEPENDENTS, the application starts to get "the transaction is in doubt," error for all operations that the use of this table. A c# .net application is, I don't have a lot of information about this (I know if it's necessary). Here is a simple code I used.

    PS: our database is oracle 11g r2, 1/8 exadata.

    CREATE TABLE T1
    (ID     NUMBER(38) PRIMARY KEY,
    MYDATA VARCHAR2(80),
    MYDATE DATE);
    
    CREATE TABLE T1_PART
    (ID     NUMBER(38),
    MYDATA VARCHAR2(80),
    MYDATE DATE)
      PARTITION BY RANGE (MYDATE) INTERVAL (NUMTOYMINTERVAL('1','MONTH'))
        (PARTITION P1 VALUES LESS THAN (TO_DATE('01/01/2010', 'dd/mm/yyyy')));
    
    
    EXEC DBMS_REDEFINITION.Can_Redef_Table(USER, 'T1');   
    
    exec DBMS_REDEFINITION.START_REDEF_TABLE(UNAME => USER, ORIG_TABLE=>'T1', INT_TABLE=>'T1_PART');   
    
    BEGIN
      dbms_redefinition.sync_interim_table(
        uname      => USER,       
        orig_table => 'T1',
        int_table  => 'T1_PART');
    END;
    /
    
    DECLARE
      l_errors NUMBER;
    BEGIN
      DBMS_REDEFINITION.copy_table_dependents(uname => USER, orig_table => 'T1', int_table =>
      'T1_PART', copy_indexes => DBMS_REDEFINITION.cons_orig_params, copy_triggers => TRUE,
      copy_constraints => TRUE, copy_privileges => TRUE, ignore_errors => FALSE, num_errors => l_errors
      , copy_statistics => false, copy_mvlog => false) ;
    
    END;
    /   
    
    
    BEGIN
      dbms_redefinition.sync_interim_table(
        uname      => USER,       
        orig_table => 'T1',
        int_table  => 'T1_PART');
    END;
    /
    
    
    BEGIN
      DBMS_STATS.GATHER_TABLE_STATS(USER, 'T1_PART', degree => 8);
    END;
    /
    
    BEGIN
      dbms_redefinition.finish_redef_table(
        uname      => USER,       
        orig_table => 'T1',
        int_table  => 'T1_PART');
    END;
    /
    
    
    

    Any idea? Thank you.

    > I just found something. Since our .net application uses the method of distributed transaction (as I understand)

    I am interested in this, if you can ask your .net developers - on this page:

    https://TechNet.Microsoft.com/en-us/library/bb896149 (v = sql.110) .aspx

    There is an example 'TransactionScope example 3.

    It shows that the two operations are established, internal and external (nested), and each uses its own connection.

    I was wondering if the two transactions (who work in the connections of different database and database sessions) work together as one "logical transaction", IE. as XA distributed transaction.

    I looked at the documentation for the TransactionScope to the page:

    https://msdn.Microsoft.com/en-us/library/ms172152.aspx

    but I couldn't find the answer to this question.

    Kind regards

    Zlatko

  • CF Storage ALUA, LUN trespassing and some doubts

    Hello!

    First of all thank you all for this great community!

    I'm setting up a cluster of small vSphere 5.5 and everything seems to be ok, but I have my doubts that I want to share. The configuration is the following:

    VMware ESX 5.5u2 with two single HBA Emulex 8 G. (Host_HBA1 and Host_HBA2)

    NetApp E2724 FC 8 G (two ports per controller) dual controller and configuration active theorytically. (Controller1_Port1, Controller1_Port2, Controller2_Port1, Controller2_Port2)

    Two switches from Brocade s300 with single initiator zoning for multiple targets (Switch1: Host_HBA1 Controller1_Port1 and Controller2_Port1 and Switch2: Host_HBA2 Controller1_Port2 and Controller2_Port2)

    Wiring seems to be OK and vSphere detects 4 paths per LUN, defines the driver seat automatically Robin and defines two active paths (e/s) and the other two as Active.

    In the Netapp LUNS are configured as LUN in VMware O.S. (they are Dinamic disk pools Volumes) and TRA seems to be enable for this kind of host.

    Well, I tried different tests (Storage VMotion between different LUNS, VMware IO monitor, create and delete virtual machines...) and everything seems to work smoothly. Strange behavior only I noticed is that when you create the storage system volumes, they are assigned to one or the other controller, and they have a "preferred owner" (ALUA). When, for example, I make a storage VMotion between two data warehouses (I have a store of data by logical unit number) and that LUN have different "privileged" controllers (LUN1 in Controller1 and LUN2 to Controller2) I noticed that the LUN2 is automatically moved to the Controller1. I don't know if this is normal behavior to improve performance or I have some configuration problem (I have a message in the journal of NetApp storage which States: I/O volume shipment implicit transfer and eventually an alarm logic unit number is not in the controller preferred). I guess the multi-channel driver using AVT to send the LUN to the same controller, but as I said, I don't know if this is normal. Would be nice if someone can clarify this point. The Storage VMotion finished well and no disk problem appears.

    Thanks again for your time!

    NetApp's official response is that they are aware of the problem and it will be fixed in a future firmware version.

  • Doubt in pl/sql.

    Hi friends,

    I have a doubt in pl/sql, I wanted to write a small program for integration of values in a table. the code I used is

    declare
    i the number: = 1;
    Start
    loop
    If I have! = 6 or i! = 8 then
    Insert into values sample2 (i);
    i: = i + 1;
    on the other
    i: = i + 1;
    end if;
    exit when I = 11;
    end loop;
    end;


    the logic I want is when I reached the value of 6 or 8, that it should not insert into the table, but the code always inserts the values into the table. I don't know where I was wrong any ideas would really help me. I am currently using ISQL * more Publisher with oracle 10g R2.

    Kind regards
    Maury

    You seem to have a bug in your Boolean logic.

    If i is 6, for example

    I have! = 6 is false
    I have! = 8 is true (6! = 8 after all)

    If your IF statement

    IF (i != 6 or i != 8)
    

    becomes

    IF (false or true)

    property to true. If you have used one AND rather than GOLD, the IF statement will evaluate false if a condition is FALSE.

    Justin

  • ocrcheck poster "failure of control of logical corruption.

    Hi, I have a strange problem, I don't know how to recover the...

    In a 'ocrcheck' at random, we found the "logical corruption" above. In the CRS_HOME/journal/nodename/client / I found the previous ocrcheck was made a month earlier and has been a success. So, something in the last month caused a logical corruption. The cluster works ok now.

    So, I tried to do an ocrdump on certain safeguards that we have and I get the following error:

    #ocrdump - backupfile backup00.ocr < < < any backup I try for a month
    PROT-306: Impossible to extract the data from cluster registry

    This error occurs when even on the backup file taken just before for the successful ocrcheck of a month earlier. The log for this ocrdump shows-

    Cat ocrdump_6494.log
    Oracle Database 11g Release 11.1.0.7.0 - Production Copyright 1996 CRS, 2007 Oracle. All rights reserved.
    12:57:17.024 2010-08-18: ocrdump [OCRDUMP] [2813008768] begins...
    12:57:17.038 2010-08-18: utread:3 [OCROSD] [2813008768]: problem reading buffer buflen 7473000 4096 retval 0 phy_offset 15982592 try again 0
    12:57:17.038 2010-08-18: utread:4 [OCROSD] [2813008768]: problem not reading the buffer errno 2 errstring no such file or directory
    2010-08-18 12:57:17.038: [OCRRAW] [2813008768] GST: Dev/Page/block [0/3870/3927] is CORRUPT (header)
    12:57:17.039 2010-08-18: rbkp:2 [OCRRAW] [2813008768]: could not read the free list
    2010-08-18 12:57:17.039: [OCRRAW] [2813008768] GST: could not read page fcl 1
    12:57:17.039 2010-08-18: rbkp:2 [OCRRAW] [2813008768]: could not read the free list
    2010-08-18 12:57:17.039: [OCRRAW] [2813008768] GST: could not read page fcl 2
    12:57:17.039 2010-08-18: fkce:2 [OCRRAW] [2813008768]: problem reading the tnode 131072
    12:57:17.039 2010-08-18: propropen [OCRRAW] [2813008768]: failed in the input key comp search [26]
    2010-08-18 12:57:17.039: [OCRDUMP] [2813008768] could not open the key handle for the name of the key [SYSTEM] [PROC-26: error when accessing the physical storage]
    2010-08-18 12:57:17.039: [OCRDUMP] [2813008768] failure trying to cross the CLE_PRINCIPALE [SYSTEM]
    2010-08-18 12:57:17.039: [OCRDUMP] [2813008768] [status = success] output...

    NOTE: a "ocrdump" of active ocr works and creates the ocrdumpfile

    Corruption in the ocr appears to be two keys pointing to the same block.

    Oracle Database 11g Release 11.1.0.7.0 - Production Copyright 1996 CRS, 2007 Oracle. All rights reserved.
    13:22:54.095 2010-08-18: ocrcheck [OCRCHECK] [285084544] begins...
    13:22:55.447 2010-08-18: protchcheck [OCRCHECK] [285084544]: OCR status: total = [262120], used = [15496], avail = [246624]

    13:22:55.545 2010-08-18: CORRUPTION LOGIC [OCRCHECK] [285084544]: current_keyname [SYSTEM.css.diskfile2] and nom_de_clu [SYSTEM.css.diskfile1.FILENAME] link to the same block_number [3928]
    13:22:55.732 2010-08-18: CORRUPTION LOGIC [OCRCHECK] [285084544]: current_keyname [SYSTEM. OCR. MANUALBACKUP. Items.0], and nom_de_clu [SYSTEM.css.diskfile1] link to the same block_number [3927]
    2010-08-18 13:23:03.159: [OCRCHECK] [285084544] [status = success] output...


    As one of the keys refers to the votedisk, appearing incorrectly on a request-

    crsctl query css votedisk
    0 0/oracrsfiles/voting_disk_01
    1 0
    2 0 backup_20100818_103455.ocr < < < < this value changes if I run a command that writes something in the rock, in this case a manual backup.


    My DBA opens a SR, but I wonder if I can use ' ocrconfig - restore "If the backupfile that I want to use is not ' ocrdump would have?"

    In addition, anyone who is familiar with the ' ocrconfig - fix "as a possible solution?

    Although it is a pole of development (two nodes) reconstruction would be a disaster ;)

    Any help or thoughts would be appreciated!

    Hey Buddy,

    My DBA opens a SR

    Well well... the problems of corruption, no doubt that there better works with support team

    , but I wonder if I can use ' ocrconfig - restore "If the backupfile that I want to use may not be ' would be ocrdump?"

    No, this isn't the idea... If your backup is not good, it cannot restore. ;)

    In addition, anyone who is familiar with the ' ocrconfig - fix "as a possible solution?

    It is to repair the nodes that have declined when a kind of change in the configuration (replace for example OCR) was performed while he was 'off', so, I guess that's not your case.

    Good luck!
    Cerreia

  • Oracle - ROWID (physical and logical)

    Hello

    Could you please clarify doubts below?
    -Difference between logical and physical ROWID
    -Difference between the ROWID and UROWID data types

    Kind regards
    Brig

    Instead of an answer, may I suggest that you go through the following link?

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14220/datatype.htm#sthref3894

  • doubt version 9.2

    SQL> ed
    Wrote file afiedt.buf
     
      1  select number_1, code, doc_type, d_number, type
      2  from (
      3    Select number_1, code, doc_type, d_number, type
      4          ,count(*) over (partition by number_1, code, doc_type, d_number, type) as cnt
      5    From uy
      6    Where CODE = 4
      7    And DOC_TYPE = 'as'
      8    And D_number = 90
      9    )
     10* order by cnt desc, type desc
    SQL> / 
     
      NUMBER_1       CODE DOC_TYPE   D_NUMBER       TYPE
    ---------- ---------- -------- ---------- ----------
           172          4 as               90        100
           172          4 as               90        100
           172          4 as               90         50
           172          4 as               90         50
           172          4 as               90         80
           172          4 as               90         10
     
    6 rows selected.
     
    SQL>
    How this partiton

    Published by: caps on March 24, 2009 21:36

    Caps says:

    SQL> ed
    Wrote file afiedt.buf
    
    1  select number_1, code, doc_type, d_number, type
    2  from (
    3    Select number_1, code, doc_type, d_number, type
    4          ,count(*) over (partition by number_1, code, doc_type, d_number, type) as cnt
    5    From uy
    6    Where CODE = 4
    7    And DOC_TYPE = 'as'
    8    And D_number = 90
    9    )
    10* order by cnt desc, type desc
    SQL> / 
    
    NUMBER_1       CODE DOC_TYPE   D_NUMBER       TYPE
    ---------- ---------- -------- ---------- ----------
    172          4 as               90        100
    172          4 as               90        100
    172          4 as               90         50
    172          4 as               90         50
    172          4 as               90         80
    172          4 as               90         10
    
    6 rows selected.
    
    SQL>
    

    How this partiton

    Should not start a thread in duplicate when you already ask the same thing on the other thread (version doubt 9.2 just because you do not have an answer right now does not mean that we will not answer you, it simply means that some of us may have gone home for the day.) We all do not operate your hours.

    As Gaff has said above, when you start a thread on the forum, give him a significant topic. Suffice it to say that it is a 'doubt' means nothing and does not have people looking at the list of threads in that it can be everything, and if it's something, they will be able to help with.

    Right, as for your question...

    The partition is part of the analytical functions of Oracle.
    Here, I used the partition to make a count the number of records were for each unique group of "number_1, code, type, d_number, doc_type"). The partition creates what is called a 'window' which is actually a group of records that the function should be applied to.

    So, if we take your data original and just apply this count (*) with partition...

    SQL> select uy.*
      2        ,count(*) over (partition by number_1, code, doc_type, d_number, type) as cnt
      3  from uy
      4  /
    
      NUMBER_1       CODE DOC_TYPE     D_NUMBER       TYPE        CNT
    ---------- ---------- ---------- ---------- ---------- ----------
           172          4 as                 90         10          1
           172          4 as                 90         50          2
           172          4 as                 90         50          2
           172          4 as                 90         80          1
           172          4 as                 90        100          2
           172          4 as                 90        100          2
    
    6 rows selected.
    

    We can see that there is 1 plug with a type of 10, 1 sheet with a type of 80, 2 records with a type of 50 and 2 records with a type of 100.

    Therefore, if I order the records of this count (descending order), we obtain records including most first occurenced...

    SQL> ed
    Wrote file afiedt.buf
    
      1  select *
      2  from (
      3    select uy.*
      4          ,count(*) over (partition by number_1, code, doc_type, d_number, type) as cnt
      5    from uy
      6    )
      7* order by cnt desc
    SQL> /
    
      NUMBER_1       CODE DOC_TYPE     D_NUMBER       TYPE        CNT
    ---------- ---------- ---------- ---------- ---------- ----------
           172          4 as                 90         50          2
           172          4 as                 90        100          2
           172          4 as                 90         50          2
           172          4 as                 90        100          2
           172          4 as                 90         80          1
           172          4 as                 90         10          1
    
    6 rows selected.
    

    So now we have the highest occurrences out upward and the lower down, but they are still a little mixed, so if we order by type (descending order) so we get the types classified in these groups of count...

    SQL> ed
    Wrote file afiedt.buf
    
      1  select *
      2  from (
      3    select uy.*
      4          ,count(*) over (partition by number_1, code, doc_type, d_number, type) as cnt
      5    from uy
      6    )
      7* order by cnt desc, type desc
    SQL> /
    
      NUMBER_1       CODE DOC_TYPE     D_NUMBER       TYPE        CNT
    ---------- ---------- ---------- ---------- ---------- ----------
           172          4 as                 90        100          2
           172          4 as                 90        100          2
           172          4 as                 90         50          2
           172          4 as                 90         50          2
           172          4 as                 90         80          1
           172          4 as                 90         10          1
    
    6 rows selected.
    

    This gives then records in the order specified in your other post.

    However, you never actually told anyone what the logic was that you wanted to actually use for this command, so the response was pure speculation based on the only thing that I could see what could bring out the folders in this order, according to the data that you have given us.

    You really need to learn to give as much information as possible when you post a question, in order to get the right answer. ;)

  • removed the audio tracks in logic pro can be restored

    removed the audio tracks in logic pro can be restored, has been save logic & empty folders to the folder came, I deleted the originals by mistake...

    Not if you don't have the original audio files on your hard drive.  If you have deleted original, your only hope he then restore from a backup of your system, you have a.

  • Logic Pro vs Sierra-accidents

    I say to that I've only been live with Sierra for a few days so that the latter can get repaired soon (I hope), BUT now I get a whole bunch of accidents. After the initial load. Most of them seem to occur when the logic is trying to load some programs IE. Native Instruments and music of Air technology-Xpand.

    After a couple of accidents because she looking a few guitars of its wide who were not there, I found that there was an orphan prefs file, so once that was taken out of the picture, it worked but I always these accidents because of the OR & Air which I have not yet been resolved.

    Anyone having problems out there like that all advice?

    Welcome to the beta test of Logic-Pro team.  :-/

  • Logic pro built in instruments

    Hello, I'm an indie game developer and I'm looking for a music software with a small budget and space since it's my first game I intend to publish I don't really have the opportunity to have a defined heck appropriate music that I did not even a microphone

    so I was wondering if I can use logic pro x without instruments, if it has a built in instruments such as garage band, otherwise it is very good...

    Logical X has a wide range of integrated instruments, better than Garageband.

    There is also a wide range of instruments and effects plug-ins free-buy music electronic magazine, many come with a wide range of free downloads, samples and real plug-ins (e.g. Computer Music magazine). They are usually VST, but many are THE (compatible logic) too.

Maybe you are looking for

  • Fake Email

    I received the following email and wanted to share in order to ensure that no one is a victim of this scam! The sender was: [email protected] via cepfonline.org according to my Gmail account. Dear Sir The following changes to your Apple ID were conduc

  • Style buttons on the pre 4.6 d?

    Hey guys, I built using the JDE 4.6 and I want to check my application is compatible with 4.2 + phones.  I noticed that it existed before BackgroundFactory and BorderFactory class that I use only started to 4.6 so I wonder what kind of style classes?

  • Port changed to remote desktop - could not get through the firewall of Windows 7

    In order to get my two work computers from home (via my router) I changed the port number for the remote desktop on one of the machines. Now, I can not him (even to my network of local work) unless I have turn off the Windows Firewall.  With the fire

  • Cannot create the VM

    When to create VMS of vCloud Director 5.6 I get the error:A general error occurred: PBM error has occurred during the PreCloneCheckCallback: connection refusedvCenter Server task (moref: task-5505) failed in vCenter Server 'vCenter01' (26e369f1-e9a7-

  • What size for you tube, because I just started shooting in HD?

    I just started using a Panasonic AG-AC130P and filmed in 1080/24 p PH, I need to make a record for my client who, in their turn, they can put on you tube.  I'm puzzled by this format to define the project for when I use the media encoder before going