How to group data in the column?

Hi all
Anyone can solve the my problem please?
I have two columns 'Age' and 'employee ID '.
I want the 'Number of employees' group for the specific AGE group:

Age | Number of employees
20 to 30 | 06
31 to 40. 13
41 to 50. 16
51 to 60. 03

And the data in the columns are put aside

Age | Employee IDS
30. 002
38. 008
33. 298
22. 213
54. 083
24. 098
So now.
Waiting for your HELP.
In advance thank you very much...
Take care

Here you go...

Drag a column of answers and name as age and in his writing of fx

case
When tablename.age between 20 and 30 then 20 to 30'
When tablename.age between 31 and 40 and 31 to 40'
When can tablename.age between 41 and 50 41 to 50'
When tablename.age between 51 and 60 and 51 to 60'
end

Drag a column of answers and name it as "Number of employees" and in his writing of fx

Count (tablename. (EmployeeID)

That would give you the report of your choice

I hope that its useful...

Thank you
Ashish Gupta

Tags: Business Intelligence

Similar Questions

  • How to add data in the column

    Hello
    I have a column name in the Emp table name now is varchar2 (100) now I only name column name is now I wants to add the name in the column without using the update statement in the column consist of the name I want to add the family name then please advise how to add in column oracle
    help appriciate.

    Thank you

    You need something like this:

    UPDATE table_name
    SET ename=ename||' '||surname
    WHERE ..... 
    
  • How to transfer data from the column of CHAR type to column?

    I have a column with data type varchar2 contains data in format: dd/mm/yyyy hh24:mm:ss for example 24/11/2013-08:15:22

    I want to execute an update statement in order to put these data in a date column how?

    Note: I use Oracle DB 10 g

    Update

    Set = to_date (, "dd/mm/yyyy hh24:mi:ss");

  • How to remove tabs, several spaces, quotes from data in the column.

    Hello

    How can we remove legs, several spaces, quotes from data in the column.

    Entry:

    H ope you 'are' Ingo w ell

    Output:

    H ope do you everything - there is a tab in hope and double-spaced in the well. This should be replaced by space. (Tab and multi spaces)

    I found myself with below:

    REGEXP_REPLACE (REGEXP_REPLACE (Replace (col, Chr (9),' '), ' () {2,} ', ' '),'[' ""]', ")

    Can we do more efficiently, your contributions are appreciated.

    I tried

    REGEXP_REPLACE (col,'[^ [a - z, A - Z, 0-9, Chr (0) - Chr (127) [: Space:]]] *', ") but the tabs still exist and that my data have German characters I can't go along with this.

    Thank you

    GVK.

    Hello

    Karthik417 wrote:

    Hello

    Thanks for your suggestion. In the above expression, we still missed to replace the double quotes.

    So thought we must use another regular expression instead of REPLACE.

    Select REGEXP_REPLACE (REGEXP_REPLACE (' H ope you "are" d "Ingo ell w ',' [' |])) CHR (9) | + ',' '),'["" "]') twice;

    I suppose we must use at least 2 REGEXP to achieve and cannot get it with a single expression.

    Thank you

    Sorry, I removed single quotes, not double - quote.  (This shows one of the reasons why having a few lines of sample data is very useful).

    I think you don't need 2 separate functions.  I do not think that the two must be REGEXP_REPLACE; You can use TRANSLATE to remove both types of quotation marks in a single function call:

    TRANSLATE (REGEXP_REPLACE (col

    , '[ ' || CHR (9) | ']+'

    , ' '

    )

    , '?'''"',

    , '?'

    )

    Of course, you can use use REGEXP_REPLACE to remove the quotes, if you really want to.

    Powerful they are, regular expressions are basically only 1 thing, things not 2 or more different.  Sometimes, he can watch as they do several things, because they can operate on character classes, like the series containing the and the and a variable number of characters.  For example, the REGEXP_REPLACE function, I used above is simply changing expression expression x y, where x is 1 consecutive or more characters of a given set.  As we both demonstrated, we can have a separate function that changes from p to q, but I know not all built-in function which, in general, can change x to y at the time that it changes from p to q.  TRANSLATE comes close, but TRANSLATE only works if x, y, p and q are single (or NULL), characters not expressions.

  • I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows?

    I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows so that I can do the calculations?

    If you start the https://forums.adobe.com/welcome Forums Index

    You will be able to select a forum for the specific Adobe products you use

    Click on the symbol "arrow down" on the right (where it is said to see all our products and Services) to open the drop-down list and scroll

  • How to join two tables to retrieve the data from the columns in table two. Tables have primary and foreign key relationships

    Hello

    I want to join the two tables to retrieve the data from the columns of the two table passing parameters to the join query. Tables have primary and foreign key relationships

    Details of the table

    Alert-1 - AlertCode (FK), AlerID (PK)

    2 AlertCode-AlertDefinition-(PK)

    Help, please


    ----------

    Hi Vincent,.

    I think that you have not worked on adf 12.1.3.  In adf 12.1.3 you don't have to explicitly create the association. When you create the EO to your table, Association xxxxFkAssoc, will be created by ADF12.1.3 for you automatically. Please try this and do not answer anything... You can also follow the links below. I solved the problem by using the following link

    Oracle ADF Guide step by step - Oracle ADF tutorial: creating a relationship of the master / detail using Oracle ADF

    ---

  • How to divide the data in the column based identifier

    Hello

    I use the oracle database.
    I have data in this format in my column 1234 ~ 2345 ~ 3456 ~ 4567.

    I need a motion to split the data in the column based on the identifier ' ~', so that I can choose the value after the second occurrence of the identifier.


    Do I know who can do this.

    Published by: 962987 on October 3, 2012 12:11

    Hello

    Welcome to the forum!

    Whenever you have any questions, please post CREATE TABLE and INSERT statements for some examples of data and the results desired from these data. For example, in view of these data

    CREATE TABLE     table_x
    (       my_column     VARCHAR2 (40)
    );
    
    INSERT INTO table_x (my_column) VALUES ('1234~2345~3456~4567');
    INSERT INTO table_x (my_column) VALUES ('just~2 parts');
    

    I think you're asking for these results

    PART_3     MY_COLUMN
    ---------- ----------------------------------------
    3456       1234~2345~3456~4567
               just~2 parts
    

    I suppose that, if the string does not contain at least 2 ' ~ s, you want to return null. It's a good idea to explain what you want like that for special cases and include examples in your sample data and results.

    Not all versions of Oracle are exactly the same. In fact, they are all different. If you want the best solution that works with your version, then say what version it is.
    The following query will work in Oracle 10.1 and higher:

    SELECT  REGEXP_SUBSTR ( my_column
                    , '[^~]+'
                    , 1
                    , 3     -- 3rd occurrence (after 2nd delimiter)
                    )     AS part_3
    ,     my_column          -- if wanted
    FROM    table_x
    ;
    

    See the FAQ forum {message identifier: = 9360002}

    Published by: Frank Kulash, October 3, 2012 15:24
    Adding sample data and results.

  • How to insert data into the BLOB column

    Hi all

    Can someone help me to insert data in the BLOB data type column?

    The structure of the table is
    CREATE TABLE XXATFL_DM_FORCAST_STG
    (
    TASK_ID NUMBER,
    USER_ID NUMBER,
    CREATED_BY NUMBER (15),
    CREATION_DATE DATE,
    LAST_UPDATED_BY NUMBER (15),
    DATE OF LAST_UPDATE_DATE,
    LAST_UPDATE_LOGIN NUMBER (15),
    RECORD_STATUS VARCHAR2 (1 BYTE),
    ERROR_MESSAGE VARCHAR2 (4000 BYTE),
    DATA_FILE BLOB
    )

    I want to insert data into the column DATA_FILE. and this insert statement inside a procedure.

    Please help me as soon as possible because it is very urgent for me

    Thank you and best regards,
    Charrier

    Charrier,

    If you form the string yourself, you can use the function utl_raw.cast_to_raw on your channel.

    http://download.Oracle.com/docs/CD/B12037_01/AppDev.101/b10802/u_raw.htm#997086

    sql> create table t(
      2    id number,
      3    l_blob blob
      4  );
    
    sql> insert into t values(1, utl_raw.cast_to_raw('SampleString'));
    
    1 row created.
    
    sql> commit;
    
    Commit complete.
    
  • How to assign the text value when the data in the column is null or empty

    Hello guys

    I have a small question

    I have a column A that half of its value is empty, now the condition is that whenever the column is empty, assign "N/a" in the column... So I wrote a code which is:

    <? If: not (column A)? > column a = 'n/a' <? end if? >

    However, when I preview the RTF model, the data in the column still has not changed at all, many lines are still empty and did not show 'n/a '... The column is of type text

    Please advice

    Thank you
    N/A
    
  • How to group and summarize the values with a vertical drop of 100?

    Dear gurus
    How to group and summarize the values with a vertical drop of 100 as the data indicated below:

    Cas_Cod_ Cas_Amt_ Description
    300 1000A
    301 200 B
    302 350 C
    400 500 A
    401 100 B
    402 25

    Now the data should be grouped like this
    A (300,400) = 1500
    (301,401) B = 300
    C (302,402) = 375

    Make sure that I don't have a column as description in my table to group data on description, its here just to give u an example.

    Hello

    using mod for hundreds:

    with x as
    (
      select 300 code, 1000 amt, 'A' descr from dual union all
      select 301 code, 200 amt, 'B' descr from dual union all
      select 302 code, 350 amt, 'C' descr from dual union all
      select 400 code, 500 amt, 'A' descr from dual union all
      select 401 code, 100 amt, 'B' descr from dual union all
      select 402 code, 25 amt, 'C' descr from dual
      )
       select mod(code,100) code, sum (amt)
        from x
       group by mod(code,100);
    

    Using the mod you get the rest of a division, so mod (300,100) = 0, mod (301,100) = 1, etc.

    Herald tiomela
    http://htendam.WordPress.com

  • the data in the column sql colorization

    Please help predict the data in the column of blue and underlined.
    I wanted to add in sql only.
    How can I add
    select 
    decode(TUFF_GENERIC_PKG.adj_status_func(m.billing_key),'Y','<a href="javascript:alert(''This billing period has an open adjustment request currently pending'')">'||  to_char(to_date('01/'||trim(substr(M.REPORT_PERIOD,5,2))||'/'||
    trim(substr(M.REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') ||'</a>','<a href="f?p=&APP_ID.:5:&APP_SESSION.:BRANCH:NO:
    5:P5_BILLING_KEY:'||m.billing_key||'">'||  to_char(to_date('01/'||trim(substr(M.REPORT_PERIOD,5,2))||'/'||
    trim(substr(M.REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') ||'</a>')
    from dual;

    Hello

    Adding style to html (a tag) in your query

    Kind regards
    Jari

  • SQL queries for reports help: need to reverse the data in the column in columns [O

    Hi all

    I'm looking for help in writing SQL, where I need to reverse the data in the columns column.

    My data in DB is as below.

    VALUE OF NAME OF MONTH
    Jan-10 M1 5
    Jan-10 M2 8
    Jan-10 M3 9
    Feb-10 M1 4
    Feb-10 M2 6
    Feb-10 M3 2
    M4 10 Feb 10
    M1 10 Mar 21
    Mar-10 M2 6

    Power required for the declaration will be like:


    MONTHS M1 M2 M3 M4
    Jan-10 5 8 9
    Feb-10 4 6 2 10
    21 Mar-10 6

    How can I do this using SQL. [ORACLE 10g]?

    I can make use of server Oracle BI also.

    Please help me on this...

    I think this is wrong forum to ask this question. You want to do it in OBIEE or at the DB level. In oBIEE you can do in a table privot view.

    Thnaks,
    Knani

  • How to erase data from the iphone if I lost and iphone is offline

    How to erase data from the iphone if I lost and iphone is offline

    < post branched out by host >

    Hello

    What to do if your iOS device is turned off or offline?

    If your missing device is turned off or offline, you can still implement this Mode lost, lockor remote wipe. The next time your device is online, these measures will take effect. If you remove the device from your account while it is offline, pending actions for the device will be cancelled.

    If your iPhone, iPad or iPod touch is lost or stolen - Apple supports

  • How to save data in the text file of Spartan 3

    Hi all

    I would like to kindly save the data table text file or a spreadsheet on vi using fpga spartan 3e as an fpga target. Once I added all the functions related to the operation of file, it gave an error that these functions are not supported by the target device.

    could you please help me with this

    Thank you

    Rania

    Hi David,

    Thank you for posting. You use LabVIEW? If so, what version of LabVIEW FPGA do you use? You use a host VI, or any deployment of code at your target to run? The file IO VI probably won't compile to target because they are not intended to be used on your host computer. Resources and the paths of files do not exist on the target FPGA, but rather on the side of the host. I have included a link below that describes how to transfer data between the FPGA and host. I hope this helps!

    http://zone.NI.com/reference/en-XX/help/371599F-01/lvfpgaconcepts/pfi_data_transfer/

  • How to save data from the COM port to file?

    Hi all

    can someone tell me please how to save data from the COM port on file? I transfer 1 byte of serial port... attached is the image of the vi... very basic.

    I would like to save the data in a table... I mean, 1 data--> data--> data tab 2 tab 3rd--> tab

    and so on... can anyone help?


Maybe you are looking for