Getting counties and divide by the sum in a single Pivot query

Hello

I have a pivot query that gives counties of all codes. I have also separated the number with the total in the same query.
e.g

  col1          col2                   col3
error_1       05-Jun-2012       parts
error_1      05_june_2012     parts
error_1      04_june_2012     consumables
error_2      04_june_2012     consumables
error_3      03_june_2012     parts
.
.
.
Now, the output should have the counts / divided into sum multiplied by 100. Basically, the percentage.


output will be something like
error                     June-2012                                 May-2012                              Feb-2012 ....      headers
error_1                    60%                                          0 %                                         0%
error_2                    20%                                          0                                             0%
error_3                    20%                                           0%                                         0%
Any suggestions please?


Thank you
Sun
with
t1 as
(select 'error_1' col1,trunc(sysdate) - 1 col2 from dual union all
 select 'error_1',trunc(sysdate) - 1 from dual union all
 select 'error_1',trunc(sysdate) + 30 from dual union all
 select 'error_2',trunc(sysdate) + 31 from dual union all
 select 'error_3',trunc(sysdate) - 2 from dual union all
 select 'error_3',trunc(sysdate) + 30 from dual union all
 select 'error_1',trunc(sysdate) - 3 from dual union all
 select 'error_2',trunc(sysdate) - 2 from dual union all
 select 'error_3',trunc(sysdate) + 30 from dual union all
 select 'error_4',trunc(sysdate) - 6 from dual
)
select col1,
       count(case to_char(col2,'mon') when 'jul' then 1 end) one,
       100 * ratio_to_report(count(case to_char(col2,'mon') when 'jul' then 1 end)) over () x,
       count(case to_char(col2,'mon') when 'jun' then 1 end) two,
       100 * ratio_to_report(count(case to_char(col2,'mon') when 'jun' then 1 end)) over () y
  from t1
 group by col1
 order by col1

Concerning

Etbin

Edited by: Etbin on 8.6.2012 14:15
used month next to keep English and slovene "LUN" same ;)

Tags: Database

Similar Questions

  • I am trying to decide if I want to register at the price of 9.99 a month plan. Will I get LR6 and I have the choice of using PSE?

    I'm trying to decide if I want to register fo RL CC 9.99 a month plan. Will I get LR6 and I have the choice to use PSE?

    Cloud creative photography subscription only includes Photoshop and Lightroom.

    Photoshop Elements that you will need to buy as individual application that comes with the serial number.

    Please check the link for more details below:

    Lightroom and Photoshop | Plan of cloud of Adobe's creative photography

  • calculation of ratios and rounding - how the sum of last record to give 1

    I'm putting in a single query to calculate the reports for an unknown number of records. I want to turn the ratios to 5 decimal places and I want the total reports of equal to 1.

    for example

    If I have 3 folders with Qty total overal 4,5,6 is 15
    I note 3 lines
    Round (4/15.5),
    Round (5/15.5),
    Round (6/15.5)

    but I want to ensure total = 1
    so I will try to do something like

    Round (4/15.5),
    Round (5/15.5),
    1 - round(4/15,5) - round(5/15,5)

    can someone help show me the sql construction? I've been trying and failing using where clause

    of course this example would add to 1 but other unknown ratios may not match up to 1.

    Published by: user12154024 on November 2, 2009 22:32

    Hello 12154024,

    Welcome to the forum. May not be a more elegant solution, but it shows how it works step by step

    WITH t AS (
    SELECT 4 n FROM dual
    UNION ALL
    SELECT  5 n FROM dual
    UNION ALL
    SELECT 6 n FROM dual
    )
    ,t1 AS (
    SELECT  n
           ,ROUND(RATIO_TO_REPORT(n) OVER (),5) AS rr
           ,COUNT(n) OVER () AS c
           ,ROW_NUMBER() OVER (ORDER BY n) AS rn
    FROM    t
    )
    ,t2 AS (
    SELECT  n
           ,rr
           ,SUM(rr) OVER (ORDER BY n) s
           ,c
           ,rn
    FROM t1
    )
    SELECT  n
           ,rr
           ,CASE WHEN c = rn THEN
                rr + (1 - s)
            ELSE
                rr
            END rr2
           ,s
    FROM    t2
    ORDER BY rn;
    
    N   RR        RR2       S
    --- --------- --------- --------
    4   0.26667   0.26667   0.26667
    5   0.33333   0.33333   0.6
    6   0.4       0.4       1        
    
    3 rows selected
    

    The part "WITH t AS" generates data
    T1 calculate the ratio, counts the number of records and signs a current issue
    T2 to calculate a cumulative ratio
    the last part takes these data and for the last record (number = count running) it allows to adjust the ratio.

    You can see if you are using other data

    WITH t AS (
    SELECT 4.78 n FROM dual
    UNION ALL
    SELECT  5 n FROM dual
    UNION ALL
    SELECT 6 n FROM dual
    )
    ...
    
    N    RR       RR2      S
    ---- -------- -------- --------
    4.78 0.30292  0.30292  0.30292
    5    0.31686  0.31686  0.61978
    6    0.38023  0.38022  1.00001  
    
    3 rows selected
    

    Concerning
    Marcus

  • I don't get width and height of the menu options

    When I click on a picture or an object I don't get width and height options menu in the upper part.

    Expand your application window

    or

    Click on the 'x' or 'y' label in the upper command band (-> opens a panel of transformation)

    or

    Use the "transformation" - Panel (if not visible, look in the menu 'windows'.)

  • Configure DHCP (get guest and host on the same network)

    First of all, I want to thank everyone for all the help that has given me so far.  I apologize that I'm such a newbie to virtualization, but I learn fast!

    I'll have set up a printer (HP OfficeJet J4860) wireless.  Here is my configuration:

    Computer: Dell computer Inspiron 1318 laptop

    VMPlayer Version: 3.0.0 build-203739

    Host o/s: Fedora 12 Linux 64-bit (2.6.31.12 kernel - 174.2.3.fc12.x86_64)

    Comments o/s: Windows 7 Home Premium

    Guest network settings: NAT (using DHCP)

    The problem I have is that the configuration of HP printer utility complains that the IP address of the printer (192.168.0.102) is not on the same network as the client (172.16.79.1).  So, in order to install the printer, I need to configure the VMware DHCP server to use IP addresses in the range 192.168.0. *.  I tried manually editing /etc/vmware/vmnet1/dhcpd/dhcpd.conf and /etc/vmware/vmnet8/dhcpd/dhcpd.conf (Yes, I know, the files that you are not supposed to change these, but I tried anyway).  Who broke everything (guest couldn't access anything whatsoever!), so I put the original files of dhcpd.conf.  I also tried to change the settings of the VM guest network to bridged and assigned a static IP to the map in Win7, but that does not work either.  (I did not try to use the Host parameter only because I don't have any idea what this means?)

    Could someone guide me please you through the configuration process of the range of IP addresses to the DHCP server on VM or manually assign IP addresses bridged network or host-only?  I have attached copies of my config output files and the vmnet1 and vmnet8 ifconfig in the case where it is useful.

    Thank you, in advance, for any help.

    Best regards, Chris

    P.S. If this question has already been answered, I'm sorry for the redundancy.  I'm looking through the forum, but I am come with has been set to the "NAT" VM network and map comments to "Using DHCP".  So, if this has been answered before, please point me to the thread.

    According to the ifconfig_output.txt IP address of the host is 10.41.1.111, and you say the IP address of the HP printer is 192.168.0.102 if the host cannot yet access the printer on this subnet so neither will be the guest who is on the 172.16.79.x subnet.

    How the host receives its IP address?

    Is there a router in the game?

    If so you can assign the guest Bridged to so it will then get an IP address from the router and then the host and the guest will be put on the same subnet and then you configure the HP printer to have an IP address that is on the same subnet but make it a static address that is outside the scope of the Pool of addresses IP DHCP servers as it better to have the printer to use a static address and not a single one in the range that would be affected through DHCP.

  • How to store and search for the sum of primes in a loop from 1 to an arbitrary value of N

    I am interested in a labview 8.5 program to find successive prime numbers from 1 to N arbitrary number given as input and find out their sum as put on front.

    Well well, OK, then. Some honesty. It's actually very refreshing. So what have you tried so far? We can offer tips and advice, but you won't have to do your homework for you. You have an algorithm? Do you know how to determine if a number is a prime number? Start with something simple. Find a way store a running total in a loop. Not too hard. Tip: Shift register (or a more recent version of LabVIEW, Feedback node)

  • How to multiply and divide with the simple calculator from win 7?

    I can do the addition and subtraction, but don't see any symbol of multiplacation or division...

    The key multiply is marked with an asterisk * and is to the right of the number 6.

    The key of the fracture is marked wiith a slash right, / and is located next to the number 9.

    Tom Ferguson

  • After the installation of 12.0, I get popups and migration from the lower left of my screen that will heal all the ads block settings.

    Whenever I visit a new Web site I can wait for one of my first 'clicks' to open a new window with something like a Quibids announcement or a site with audio asking me to take a survey vaguely regarding the site I'm. There is also an ad in the migration of the lower-left corner of my screen that no amount of effort will get rid of. It didn't happen until last week when I downloaded the latest version of Firefox. My OS is Windows 7 on a Toshiba laptop. I connect with a hotspot from Verizon at home only. I scan all emails before downloading from the server PC of the population. I ran most of Windows and a couple of free virus programs did a full scan nothing helps. This problem does not exist when I navigate with Windows Explorer.

    Sometimes a problem with Firefox can be a result of malware installed on your computer, you may not be aware of.

    You can try these free programs to search for malicious software that work with your existing anti-virus software:

    Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one.

    More information can be found in the article troubleshooting Firefox problems caused by malware .

    This solve your problems? Please report to us!

  • Whenever I do a search on the main page and get results, I click on a link and get diverted, I need to get out and re - click the link and then I usually get on the site I wanted to, it is a problem of computer or a problem of firefox or google?

    Whenever I do a search and click on a website search results, I am confused on some other Web site, usually a few ad-site.
    I then have to click the back button and click the link again and it usually takes me on the site that I wanted to. Is it a problem with my computer of viruses, or a problem with firefox or google?

    Download, install and update as much of the following as possible until your infections are cleaned.

    1. The free versions of these scanners will detect infections and clean your system; no need to buy
    2. Scanners different malware detect some malware that other scanners do not have.
    3. If you are unable to download malicious programs,
      • change the name of the Installer before you save the download on your hard drive, and
      • Once installed, go to the installation to the program folder and change the name of the executable file of the program (i.e. for Malwarebytes Anti-Malware, change mbam.exe to xyz - mb.exe), then update the program and run the scan.
      • You may need to download on a non infected computer, change the name of the Setup program, copy setup from a CD or USB and transport to your system for installation.
    4. Some stubborn malware should be deleted in Windows Safe Mode with setting network '. Warning: download all the tools first, then disconnect your modem before entering Mode Windows safe, as your firewall and AV/AS probably does not load mode Windows safe. See:

    If they cannot find or cannot remove the infection (s), post it in one of these specialized forums using malware removal:

    1. Read and follow their rules for display
    2. Follow the instructions to the letter
    3. Be patient; you are put in a queue and you will get a response when they get to your message

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • Get-qaduser and filtering on the secondary owners

    Hello!

    We service accounts / applications with defined secondary owners.  For example the query syntax below returns no results

    Get-qaduser - SearchRoot 'CN = Active Directory' - scope subtree - Sizelimit 10 - LdapFilter ' (edsva
    SecondaryOwners = *) "-ReturnDNOnly"

    For the filter, I tried "SecondaryOwners" and edsvaSecondaryOwners

    If I filter on edsvaSecondaryOwnerguids - it works, I get results...

    > get-qaduser - SearchRoot ' CN = Active Directory "-scope subtree - SizeLimit LdapFilter 10 - '(edsvaSecondaryOwnerguids=*)'-ReturnDNOnly"

    .. but dealing the guid name vs is a little more work and not intuitive for some of the admins using the cmdlets.  Has anyone else seen this behavior?

    I got to thinking of your condition and provide the following suggestion:

    Have you considered creating a unit of ARS managed to keep these accounts?

    Once you delegate to them the possibility to see, your admins might simply query the content of the unit managed when they seek to manipulate these accounts.

    Membership for the management unit rule would be (for user objects) "this edsvaSecondaryOwnerGUIDs" more OU brought you can do (on the basis where these accounts live in AD if you care for that be accurate)

    Then, when you want to list your service accounts, all you have to do in PoSh is:

    Get-qaduser - searchroot "CN = my account Service MU, CN = Managed units, CN = Configuration," proxy

    Easy enough for your Yes admins?

  • Show counts and averages for the 3 categories of side by side

    The following query was initially developed for the calculation of GPAs (the 920965 thread id). I changed to perform the same type of summary on partitions.
    The problem is that there are 3 types of partitions as opposed to a single type of GPA. When I run the query for the partition type, the results for
    that the partition type come out well, however, when I tried to add in other partition types (they have been commented out in the query below), results
    come not good when was 01:20 more in the query. This query can be modified to handle several types of partition, or will I
    need to separate runs for each type?

    Here the result should look like. The numbers in the pass are the number of students who have a score within each range
    and the overall average rating for each category is at the bottom.

    EXAMPLE OF SUMMARY:
      Score Range     Read     Math     Write
                   
     001 - 299     18     12     25
     300 - 349     60     50     50
     350 - 399     235     150     207
     400 - 449     523     400     463
     450 - 499     840     870     857
     500 - 549     1300     1189     1314
     550 - 599     1321     1400     1425
     600 - 649     1298     1280     1262
     650 - 699     605     940     737
     700 - 749     200     265     330
     750 - 800     109     119     102
     NO SCORES     1450     1284     1187
                   
     TOTAL     7959     7959     7959
                   
     AVERAGE     553     563     559
    Details of the sample:
    ID     READ     MATH     WRITE
    121212     570     520     550
    112121     650     570     600
    121121     
    111221     
    111122     600     625     610
    The way that the query runs now, if I run only during playback, playback numbers doing well, if I run it only for mathematics, Math numbers
    Come in fine, etc. When I typed in the query, the numbers came out badly.


    -This part creates the table in the range.  Usually just create once
    CREATE TABLE    Score_Range
    AS
    SELECT  000 AS low_score, 300 AS high_score, '001 - 299' AS display_txt, 1  AS range_sort    FROM dual    UNION ALL
    SELECT  300 AS low_score, 350 AS high_score, '300 - 349' AS display_txt, 2  AS range_sort    FROM dual    UNION ALL
    SELECT  350 AS low_score, 400 AS high_score, '350 - 399' AS display_txt, 3  AS range_sort    FROM dual    UNION ALL
    SELECT  400 AS low_score, 450 AS high_score, '400 - 449' AS display_txt, 4  AS range_sort    FROM dual    UNION ALL
    SELECT  450 AS low_score, 500 AS high_score, '450 - 499' AS display_txt, 5  AS range_sort    FROM dual    UNION ALL
    SELECT  500 AS low_score, 550 AS high_score, '500 - 549' AS display_txt, 6  AS range_sort    FROM dual    UNION ALL
    SELECT  550 AS low_score, 600 AS high_score, '550 - 599' AS display_txt, 7  AS range_sort    FROM dual    UNION ALL
    SELECT  600 AS low_score, 650 AS high_score, '600 - 649' AS display_txt, 8  AS range_sort    FROM dual    UNION ALL
    SELECT  650 AS low_score, 700 AS high_score, '650 - 699' AS display_txt, 9  AS range_sort    FROM dual    UNION ALL
    SELECT  700 AS low_score, 750 AS high_score, '700 - 749' AS display_txt, 10 AS range_sort    FROM dual    UNION ALL
    SELECT  750 AS low_score, 999 AS high_score, '750 - 800' AS display_txt, 11 AS range_sort    FROM dual    UNION ALL
    SELECT  NULL,          NULL,           'No Scores',                      13           FROM dual;
    ------------------------------------------------------------------------------------------------------------------------

    -This part is the actual query to use to see the summary
    WITH interesting_score_stat AS
    (
        SELECT stu_population, '1Applied' Status, college,
               sat_read, sat_math, sat_write
        FROM   gpa_stat
        WHERE  stu_population  in ('F','T')
        AND    academic_period = '200940'
    UNION ALL
        SELECT stu_population, '2Accepted' Status, college,
               sat_read, sat_math, sat_write
        FROM   gpa_stat
        WHERE  stu_population  in ('F','T')
        AND    academic_period = '200940'
        AND    accepted = 1
    UNION ALL
        SELECT stu_population, '3Deposit' Status, college,
               sat_read, sat_math, sat_write
        FROM   gpa_stat
        WHERE  stu_population  in ('F','T')
        AND    academic_period = '200940'
        AND    accepted = 1
        AND    deposit  = 1
    ),       all_colleges      AS
    (
        SELECT DISTINCT stu_population, Status, college
        FROM   interesting_score_stat
        
    )
    SELECT c.stu_population, 
           c.Status,
           c.college,
           r.display_txt           AS scorerange,
           COUNT (s.college)       AS count,
           round(NVL(AVG(s.sat_read),0),0)  AS avgRead
    --       round(NVL(AVG(s.sat_math),0),0)  AS avgMath,
    --       round(NVL(AVG(s.sat_write),0),0) AS avgWrite
    FROM  all_colleges           c
    CROSS JOIN score_range         r
    LEFT OUTER JOIN interesting_score_stat s    
      ON ( c.stu_population   = s.stu_population
     AND   c.status    = s.status
     AND   c.college   = s.college
     AND   r.low_score  <= s.sat_read
     --AND   r.low_score  <= s.sat_math
     --AND   r.low_score  <= s.sat_write
     AND   r.high_score  > s.sat_read
    -- AND   r.high_score  > s.sat_math
    -- AND   r.high_score  > s.sat_write
         )
      OR ( c.stu_population  =  s.stu_population 
     AND   c.status   =  s.status
     AND   c.college  =  s.college
     AND   r.low_score     IS NULL
     AND   s.sat_read      IS NULL
    -- AND   s.sat_math      IS NULL
    -- AND   s.sat_write     IS NULL
         )
    GROUP BY c.stu_population, 
             c.status, 
             cube ( c.college, 
                    r.display_txt
                  )
    ORDER BY c.stu_population, 
             c.status, 
             c.college, 
             r.display_txt
     
    ;

    Hello

    To make the sample data easier to manage, I cut socre_range up to four lines:

    SELECT  450 AS low_score, 500 AS high_score, '450 - 499' AS display_txt, 5  AS range_sort    FROM dual    UNION ALL
    SELECT  500 AS low_score, 550 AS high_score, '500 - 549' AS display_txt, 6  AS range_sort    FROM dual    UNION ALL
    SELECT  550 AS low_score, 600 AS high_score, '550 - 599' AS display_txt, 7  AS range_sort    FROM dual    UNION ALL
    SELECT  NULL,          NULL,           'No Scores',                      13           FROM dual;
    

    and use these data in gpa_stat:

    select '12345678' ID, '200940' Academic_period, 'Freshmen' Stu_Pop, 'F' Stu_population, 'LA' College, 1 Applied, 1 Accepted, 1 Deposit, 560 SAT_READ, 590 SAT_MATH, 510 SAT_WRITE from dual union all
    select '23456789',     '200940',    'Transfer',    'T',     'LA',    1,    1,    0,  null, null, null    from dual union all
    select '34567890',    '200940',    'Freshmen',    'F',    'BN',    1,    1,    1,    500,    510,    540 from dual union all
    select '45678901',    '200940',    'Freshmen',    'F',    'BN',    1,    1,    1,    530,    520,    630 from dual union all
    select '56789012',    '200940',    'Freshmen',    'F',    'BN',    1,    1,    1,    550,    520,    540 from dual union all
    select '67890123',    '200940',    'Freshmen',    'F',    'LA',    1,    1,    1,    null,    null,  null from dual 
    

    This query:

    WITH   cntr        AS
    (
         SELECT     LEVEL     test_code
         FROM     dual
         CONNECT BY     LEVEL <= 3     -- # of measure columns (sat_read, sat_math and sat_write)
    )
    ,     unpivoted_data         AS
    (
         SELECT     s.stu_population
         ,     CASE
                   WHEN  accepted = 1
                   AND   deposit  = 1
                               THEN     3
                   WHEN  accepted = 1
                               THEN     2
                               ELSE     1
              END     AS status_lvl
         ,     s.college
         ,     c.test_code
         ,     CASE     c.test_code
                   WHEN  1          THEN  sat_read
                   WHEN  2          THEN  sat_math
                   WHEN  3          THEN  sat_write
              END     AS score
         FROM          gpa_stat     s
         CROSS JOIN     cntr          c
         WHERE   stu_population          IN ('F', 'T')     -- Do all filtering here
         AND     academic_period          = '200940'
    )
    ,     all_colleges     AS
    (
         SELECT DISTINCT     college
         FROM             unpivoted_data
    )
    ,     all_populations     AS
    (     SELECT DISTINCT     stu_population
         FROM             unpivoted_data
    )
    SELECT       p.stu_population
    ,       a.display_txt                              AS status
    ,       c.college
    ,       NVL ( r.display_txt
               , ' (Total)'
               )                                   AS scorerange
    ,       COUNT     (CASE WHEN u.test_code = 1 THEN 1     END)     AS read
    ,       AVG      (CASE WHEN u.test_code = 1 THEN score END)     AS avgread
    ,       COUNT (CASE WHEN u.test_code = 2 THEN 1     END)     AS math
    ,       AVG      (CASE WHEN u.test_code = 2 THEN score END)     AS avgmath
    ,       COUNT (CASE WHEN u.test_code = 3 THEN 1     END)     AS write
    ,       AVG      (CASE WHEN u.test_code = 3 THEN score END)     AS avgwrite
    FROM                    all_populations p
    CROSS JOIN         all_status         a
    CROSS JOIN         all_colleges    c
    CROSS JOIN         score_range     r
    LEFT OUTER JOIN     unpivoted_data  u     ON       u.stu_population  =  p.stu_population
                                             AND     u.status_lvl       >= a.lvl_id
                                             AND      (     (       u.score      >=  r.low_score
                                                          AND       u.score      <   r.high_score
                                          )
                                  OR     (       u.score      IS NULL
                                          AND       r.low_score  IS NULL
                                          )
                                      )
                             AND     u.college       =  c.college
    GROUP BY  p.stu_population
    ,            a.display_txt
    ,       c.college
    ,       ROLLUP ((r.display_txt))
    ORDER BY  p.stu_population
    ,            a.display_txt
    ,         c.college
    ,       GROUPING (r.display_txt)
    ,            MIN (r.range_sort)
    ;
    

    produces this output:

    STU STATUS    CO SCORERANG READ READ MATH MATH WRITE WRITE
    --- --------- -- --------- ---- ---- ---- ---- ----- -----
    F   1Applied  BN 450 - 499    0         0          0
    F   1Applied  BN 500 - 549    2  515    3  517     2   540
    F   1Applied  BN 550 - 599    1  550    0          0
    F   1Applied  BN No Scores    0         0          0
    F   1Applied  BN  (Total)     3  527    3  517     2   540
    F   1Applied  LA 450 - 499    0         0          0
    F   1Applied  LA 500 - 549    0         0          1   510
    F   1Applied  LA 550 - 599    1  560    1  590     0
    F   1Applied  LA No Scores    1         1          1
    F   1Applied  LA  (Total)     2  560    2  590     2   510
    F   2Accepted BN 450 - 499    0         0          0
    F   2Accepted BN 500 - 549    2  515    3  517     2   540
    F   2Accepted BN 550 - 599    1  550    0          0
    F   2Accepted BN No Scores    0         0          0
    F   2Accepted BN  (Total)     3  527    3  517     2   540
    F   2Accepted LA 450 - 499    0         0          0
    F   2Accepted LA 500 - 549    0         0          1   510
    F   2Accepted LA 550 - 599    1  560    1  590     0
    F   2Accepted LA No Scores    1         1          1
    F   2Accepted LA  (Total)     2  560    2  590     2   510
    F   3Deposit  BN 450 - 499    0         0          0
    F   3Deposit  BN 500 - 549    2  515    3  517     2   540
    F   3Deposit  BN 550 - 599    1  550    0          0
    F   3Deposit  BN No Scores    0         0          0
    F   3Deposit  BN  (Total)     3  527    3  517     2   540
    F   3Deposit  LA 450 - 499    0         0          0
    F   3Deposit  LA 500 - 549    0         0          1   510
    F   3Deposit  LA 550 - 599    1  560    1  590     0
    F   3Deposit  LA No Scores    1         1          1
    F   3Deposit  LA  (Total)     2  560    2  590     2   510
    
                                     AVG       AVG         AVG
    STU STATUS    CO SCORERANG READ READ MATH MATH WRITE WRITE
    --- --------- -- --------- ---- ---- ---- ---- ----- -----
    T   1Applied  BN 450 - 499    0         0          0
    T   1Applied  BN 500 - 549    0         0          0
    T   1Applied  BN 550 - 599    0         0          0
    T   1Applied  BN No Scores    0         0          0
    T   1Applied  BN  (Total)     0         0          0
    T   1Applied  LA 450 - 499    0         0          0
    T   1Applied  LA 500 - 549    0         0          0
    T   1Applied  LA 550 - 599    0         0          0
    T   1Applied  LA No Scores    1         1          1
    T   1Applied  LA  (Total)     1         1          1
    T   2Accepted BN 450 - 499    0         0          0
    T   2Accepted BN 500 - 549    0         0          0
    T   2Accepted BN 550 - 599    0         0          0
    T   2Accepted BN No Scores    0         0          0
    T   2Accepted BN  (Total)     0         0          0
    T   2Accepted LA 450 - 499    0         0          0
    T   2Accepted LA 500 - 549    0         0          0
    T   2Accepted LA 550 - 599    0         0          0
    T   2Accepted LA No Scores    1         1          1
    T   2Accepted LA  (Total)     1         1          1
    T   3Deposit  BN 450 - 499    0         0          0
    T   3Deposit  BN 500 - 549    0         0          0
    T   3Deposit  BN 550 - 599    0         0          0
    T   3Deposit  BN No Scores    0         0          0
    T   3Deposit  BN  (Total)     0         0          0
    T   3Deposit  LA 450 - 499    0         0          0
    T   3Deposit  LA 500 - 549    0         0          0
    T   3Deposit  LA 550 - 599    0         0          0
    T   3Deposit  LA No Scores    0         0          0
    T   3Deposit  LA  (Total)     0         0          0
    
    60 rows selected.
    

    Among the assumptions I made were some of status.
    The different status of the status values seem to be subsets of each other. Otherwise said, any line that is qualified as "3Deposit" is also considered to be '2Accepted' and any line which is recorded as "2Accepted" is also considered to be '1Applied.
    For the same reason that you should have a table of scre_range, you must also have a table for the statutes of the thesis, like this:

    CREATE TABLE  all_status
    AS
    SELECT     1 as lvl_id, '1Applied' AS display_txt     FROM dual     UNION ALL
    SELECT     2,             '2Accepted'             FROM dual     UNION ALL
    SELECT     3,          '3Deposit'               FROM dual;
    

    where the highest lvl_ids are supposed to include lower levels (for example, lvl_id 1 is a subset of the 2 and 3).

    When there is no line in a group, the Middle columns in the output above remains NULL.
    0 in these places, use "NVL (AVG (...), 0) ' instead of «AVG (...)»

  • How to get documents and data to the cloud on my Mac desktop?

    After the upgrade to Sierra all my data (documents and desktop) have been transferred to Icloud. I absolutely not want all my data on another server costs me more money. How do I lose all my data safely back on my Mac, without anything? I'm quite t... o... that the decisions of this importance are make with a single click (or without?). Preferably, I do not want to export every file (of the thousands...) by hand, but just change things back to where it was before.

    Thanks in advance!

    Documents are also in your folder on the drive on your Mac iCloud.

    Just disable iCloud drive in iCloud preferences.

    Then go icloud.com and connect, then you remove the files on disc to iCloud.

    8. how to disable iCloud drive?

    To disable iCloud Drive on your iOS device, go to settings > iCloud > iCloud driveand on your Mac, go to the Apple menu > System Preferences > iCloud. If you disable iCloud drive, so you you will manage your files locally, documents are not synchronized or updated your iOS iOS devices 8 or OS X Yosemite or iCloud.com.

    http://www.iphonehacks.com/2015/01/icloud-drive-Guide.html

  • Can I get waterfox and firefox on the same computer

    I now use firefox 9.0 32-bit, then I install waterfox 9.0 and still use firefox. I have windows 7 32 & 64 bit

    Just make sure you install each version of a separate program folder (make an installation customized if necessary) and that you use a separate profile for each version folder.

    I don't know if Waterfox uses the same profiles.ini file to save profiles that Firefox works, but in case it then make sure to create a new profile.

  • Qosmio F20 - 111et Windows Vista - cannot get sound and driver to the display work

    Dears

    I just installed windows vista Home premium 32-bit, but I faced with 2 main problems, which are:

    1 - sound:
    2 - GO 6600 128 MB graphics card

    I found the driver for them, but it did not work so I need help you please.

    Respect of

    Hello

    Unfortunately, I have not Qosmio G20 but if you use option search on this forum, you can find interesting topics on Vista on Qosmio F20.

    For the test of its http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=24004

    Display, maybe this will help you http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=21823&messageID=80423

    Make sure that the BIOS is updated to the latest version.

    Bye and good luck!

  • Import and export all the brushes in a single step?

    As I work with the actions of Photoshop that claim to replace my brushes through the brushes compensation I am looking for a way to export my brushes and safe in a folder, perform the action and then import my own brushes in a single step and not step by step... brush to brush.

    Can someone useful?

    Hi the franks.

    As far as I understand, looking for ways to to export and import your brushes.

    Here are the steps:

    • Go to the window menu in Photoshop > choose Manager of Preset
    • Select all brushes > click on Save Set > choose the location where you want to save this file brush
    • The tasks that you want to
    • Again go to the preset manager > choose Load > select this brush file that you saved earlier and it would load your brushes.

    Kind regards

    Claes

Maybe you are looking for

  • Qosmio DX1210 - ODD does not read discs

    Hello, I was asked to help fix a friends computer its anToshiba DX1210 all-in-one desktop. its about 1 years with no problems until today the hard drive has suddenly stopped reading discs completely it custom similarly recognize that there is a disc

  • Laptop does not stop automatically.

    Hello I have a HP 2000 t - 2d 00 CTO Notebook PC, model: D6Q45AV. While I turned off my laptop, the computer stops with the message saying Shutting Down as usual. However when the screen goes black, the power is still on (lights are always on) and th

  • Manual for Pages

    I have Pages 5.6.1 (2562) and can not find a manual. Maybe the version numbers differ in the support area and a display on the Pages. But it just seems to be older versions.

  • Time machine wants to inherit the last backup I did on the same computer

    I made a backup for a while (6 months).  At the start of time machine, I get a box asking if I want to inherit the history of backups from another computer.  The problem is that the backup was not made on another computer... earlier versions have bee

  • LV memory leak - how to use windows API SetProcessWorkingSetSize (from Kernel32.dll)

    Hi comrade LV'ers Well - it's a little tricky, but I will try and explain the problem and then ask the solution, because it is maybe someone knows a better way to deal with this... can get a bit long, sorry - if a solution comes up it will allow all