Get only one line for each type of a column

Hello!
I have a little problem.

I have a table with 10 columns. One of them has repeated values. My goal is to get all the lines with this column only once for each values he holds.

Ex:

Col1 Col2 Col3
A A A A
B B B
C A C
D C D


Column 2 has repeated values. My goal is to get:

A A A A
B B B
D C D

Only once each value in column 2.

Thank you guys! ;)
SQL>  CREATE TABLE Tbl (col1 VARCHAR2(1),col2 VARCHAR2(1),col3 VARCHAR2(1));

Table created.

SQL> INSERT INTO Tbl VALUES ('A','A','A');

1 row created.

SQL>              INSERT INTO Tbl VALUES ('B','B','B');

1 row created.

SQL>              INSERT INTO Tbl VALUES ('C','A','C');

1 row created.

SQL>              INSERT INTO Tbl VALUES ('D','C','D');

1 row created.

SQL> commit;

Commit complete.

SQL> SELECT * FROM tbl t1
  2  WHERE
  3  rowid=(SELECT min(rowid)
  4         FROM tbl t2
  5         WHERE t1.col2=t2.col2);

C C C
- - -
A A A
B B B
D C D

SQL> SELECT * FROM tbl t1
  2  WHERE
  3  rowid=(SELECT max(rowid)
  4         FROM tbl t2
  5         WHERE t1.col2=t2.col2);

C C C
- - -
B B B
C A C
D C D

Published by: Johan August 3, 2010 01:31

Tags: Database

Similar Questions

  • need to get only one line when you use between (date columns)

    Hi all

    create the table SAMPLE_ITEMS

    (ITEM_NO, varchar2 (10))

    Date DELIVERY_DATE,

    Number of QTY_SUM1

    Number of QTY_SUM2

    Number ITEM_QTY,

    Number ORDER_QTY,

    Number ITEM_AMOUNT,

    Number of SALES_AMOUNT

    );

    insert into SAMPLE_ITEMS values ('AAA', ' 28 / 04/2014 ',-88, 0,475,262,-123.45,-1188);

    insert into SAMPLE_ITEMS values ('AAA', ' 28 / 05/2014 ', 0, - 122, 475, 262, - 10.234,-1647);

    insert into SAMPLE_ITEMS values ('AAA', ' 16 / 06/2014. ', 0, 0,475,262,-80.59,-135);

    insert into SAMPLE_ITEMS values ('AAA', 19 December 2014 ', 0, 0,475,262,-42.29,-67.5);

    Setting out with my own query,

    ITEM_NOTRUNC (DELIVERY_DATE)QTY_SUM1QTY_SUM2ITEM_QTYORDER_QTYITEM_AMOUNTSALES_AMOUNT
    AAA28/04/2014-880475262-123.45-1188
    AAA28/05/20140-122475262-10.234-1647
    AAA16/06/201400475262-80.59-135
    AAA19/12/201400475262-42.29-67.5

    Every time I question as code

    Select * from SAMPLE_ITEMS

    where DELIVERY_DATE between April 28, 2014 ' and 19 December 2014 '-> they must pass as a parameter

    I need to get only one line

    AAA-88-122475262-256.564-3037.5

    Database 11.2.0.1.0

    Note; Please do not use MAX for Date and do not want to display Date columns in the result

    Note 1: I want to choose DELIVERY_DATE in select it also and only get a line like above the expected result

    SELECT item_no

    SUM (qty_sum1),

    SUM (qty_sum2),

    SUM (DISTINCT item_qty),

    SUM (DISTINCT order_qty),

    SUM (item_amount),

    SUM (sales_amount)

    OF SAMPLE_ITEMS

    WHERE the DELIVERY_DATE BETWEEN TO_DATE (28 April 2014 ', "dd/mm/yyyy")

    AND TO_DATE (19 December 2014 ', "dd/mm/yyyy")

    GROUP BY item_no;

    I will get

    ITEM_NO Trunc (DELIVERY_DATE) QTY_SUM1 QTY_SUM2 ITEM_QTY    ORDER_QTY TTEM_AMOUNT SALES_AMOUNT        

    AAA             12/19/2014                         -88                 -122                475                262                       -256.564              -3037.5

    OK fine, I want to choose DELIVERY_DATE as if so I'll have all the lines, but I want to only show one as shown above

    Because I do report discoverer in Oracle Apps, without taking the DELIVERY_DATE of the select query, it is not possible to move the date as a parameter

    Can you please help me how to do this?

    Thank you

    Post edited by: Rajesh123 NOTE added in the body of the Message

    Post edited by: added test Rajesh123 messages

    Maybe you want a single line in all cases

    Select si.item_no,

    start_date min (d.start_date),

    min (d.end_date) end_date,

    min (si.qty_sum1) qty_sum1,

    min (si.qty_sum2) qty_sum2,

    min (si.item_qty) item_qty,

    min (si.order_qty) order_qty,

    Sum (si.item_amount) item_amount,

    Sum (if. Sales_Amount) sales_amount

    of (start_date select to_date(:date_from,'dd-MON-yyyy'))

    to_date(:date_to,'dd-mon-yyyy') end_date

    of the double

    ) d

    left outer join

    TR sample_items

    on the si.delivery_date between d.start_date and d.end_date

    Group of item_no

    ITEM_NO START_DATE END_DATE QTY_SUM1 QTY_SUM2 ITEM_QTY ORDER_QTY ITEM_AMOUNT SALES_AMOUNT
    - 01/01/1900 31/12/2000 - - - - - -

    Concerning

    Etbin

  • Shoot only one email for each account

    I have a table with account, e-mail columns. Each account has five different emails. Now, I want to draw only one email for each account. One of the five e-mails for each account. Please help me with the SQL.

    Varun says:
    I have a table with account, e-mail columns. Each account has five different emails. Now, I want to draw only one email for each account. One of the five e-mails for each account. Please help me with the SQL.

    Assuming that all of the 5 different emails are in a single column

    SELECT account,email
    from (select Account,email,row_number() over(partition by account) rn
    from your table)
    where rn=1
    

    Hope this helps

    Kind regards
    Claudy

  • Link from Oracle to MySQL database select only one line

    Hello

    I created a connection to the batabase Oracle 11.2 to a MySQL database via a database link. The following statement shows that 35 lines are in the mySQL table:

    SQL > select count (*) from 'main_pages"@MOREWEB;

    COUNT (*)

    ----------

    35

    But a normal select statement only return 1 row.

    SQL > select 'subject' of 'main_pages"@MOREWEB;

    Object

    ------------------------------------------------

    Übersicht: references

    I use the mysql-connector-odbc driver - 3.51.30 - winx64. One is the newer version be installed because on Windows Server 2008 R2, I get an error with a missing dll file. The DataDirect ODBC driver is not possible, because we like to use the MySQL-database free one only support for DataDirect enterprise edition.

    I have also tried to limit the HS_OPEN_CURSORS or do not limit the HS_FDS_FETCH_ROWS, but there is no difference in the result. I always get only one line.

    HS Init.ora

    # This is an example of initialization file of the agent that contains the HS settings

    # necessary for the database to ODBC gateway

    #

    # HS init parameters

    #

    HS_FDS_CONNECT_INFO = moreweb

    HS_FDS_TRACE_LEVEL = WE

    HS_FDS_FETCH_ROWS = 1

    #

    # Required for the non-Oracle system environment variables

    #

    #set < varenv > = < value >

    HS trace file

    Oracle Corporation - MITTWOCH 5 November 2014 13:56:22.066

    Heterogeneous Agent release

    11.2.0.1.0

    Oracle Corporation - MITTWOCH 5 November 2014 13:56:22.066

    Version 11.2.0.1.0

    HOSGIP to 'HS_FDS_TRACE_LEVEL' returned 'ON '.

    HOSGIP to 'HS_OPEN_CURSORS' returned '50 '.

    HOSGIP to 'HS_FDS_FETCH_ROWS' returned '1 '.

    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536".

    HOSGIP to 'HS_NLS_NUMERIC_CHARACTER' returned '. "

    HOSGIP to 'HS_KEEP_REMOTE_COLUMN_SIZE' returned 'OFF '.

    HOSGIP for "HS_FDS_DELAYED_OPEN" returns 'TRUE '.

    HOSGIP to 'HS_FDS_WORKAROUNDS' returned '0 '.

    HOSGIP to 'HS_FDS_MBCS_TO_GRAPHIC' returned 'FALSE '.

    HOSGIP to 'HS_FDS_GRAPHIC_TO_MBCS' returned 'FALSE '.

    HOSGIP to 'HS_FDS_RECOVERY_ACCOUNT' returned 'RECOVER '.

    HOSGIP for "HS_FDS_TRANSACTION_LOG" returns "HS_TRANSACTION_LOG".

    HOSGIP to 'HS_FDS_TIMESTAMP_MAPPING' returned 'DATE '.

    HOSGIP to 'HS_FDS_DATE_MAPPING' returned 'DATE '.

    HOSGIP to 'HS_FDS_CHARACTER_SEMANTICS' returned 'FALSE '.

    HOSGIP for "HS_FDS_MAP_NCHAR" returns 'TRUE '.

    HOSGIP to 'HS_FDS_RESULTSET_SUPPORT' returned 'FALSE '.

    HOSGIP to 'HS_FDS_RSET_RETURN_ROWCOUNT' returned 'FALSE '.

    HOSGIP to 'HS_FDS_PROC_IS_FUNC' returned 'FALSE '.

    HOSGIP to 'HS_FDS_REPORT_REAL_AS_DOUBLE' returned 'FALSE '.

    using mpgw as the default value to "HS_FDS_DEFAULT_OWNER".

    HOSGIP to 'HS_SQL_HANDLE_STMT_REUSE' returned 'FALSE '.

    SQL text of hgopars, id = 1, len = 36...

    45 00: 53454 C 43542043 4F554E54 282 HAS 2920 [COUNT (*) SELECT]

    10: 46524F4D 20606D 61 696E5F70 61676573 [FROM ' main_pages]

    20: 60204131 [' A1]

    Delayed open until the first fetch.

    Deferred execution open.

    SQL text of hgopars, id = 1, len = 40...

    45 00: 53454 C 43542041 312E6073 75626 has 65 [SELECT A1.' subje(1)]

    10: 63746020 46524F4D 20606D 61 696E5F70 [ct' FROM ' main_p]

    20: 61676573 60204131 [ages A1]

    Delayed open until the first fetch.

    Deferred execution open.

    Please can someone help me.

    Thank you.

    Bianca

    Bianca,

    Everything I've read on this point to a need to install/reinstall the Microsoft Visual C++ Redistributable Package for windows OS 2008.

    You will need to download the appropriate version for your microsoft form system.  There is a lot of information on this topic.  Just

    search on the web, and it should help you in the right direction.

    Thank you!
    Matt

  • I need to create a table of contents in iPages but I want only one word for the title, not the line of holes. Or, how can I change the contents of the table? Thank you!

    I need to create a table of contents in iPages but I want only one word for the title, not the line of holes. Or, how can I change the contents of the table? Thank you!

    Yes, you can have a one word title, by assigning a paragraph style title to this one word. No, you cannot change the text in a Table of contents, but you can change paragraph style font attributes (line) and add for example, a head of points between the types of OCD paragraph and page numbers. No part of the table of contents will not provide hyperlinks in exported PDF documents.

    When you look up in the menu bar, you can see the word iPages, or simply Pages. There is no product of iPages.

  • table is expected to insert only one line

    Hi all

    my need is to create the table that allows to insert only one line.

    How can I make it?

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    "CORE 11.2.0.1.0 Production."

    AMT for Linux: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    Hello

    2621671 wrote:

    Hi all

    my need is to create the table that allows to insert only one line.

    How can I make it?

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    "CORE 11.2.0.1.0 Production."

    AMT for Linux: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    You can create a unique Index based on a function, like this:

    CREATE UNIQUE INDEX table_x_u ON table_x (NVL2 (col_1, 1, 1));

    You can use any column of any data type.  In other words, the function may return a NUMBER, if the column referenced in the function is a NUMBER.

    Regardless of whether the column is NULL or not; not more than 1 rank is authorized.

  • Merge only one line on several lines

    I need prepare a merge statement that merge only one line in a table. Here is the table definition, data instruction and fusion sample, I used.
          CREATE TABLE Mob_Attr (NAME VARCHAR2(20), ATTR_1 VARCHAR2(20), ATTR_2 VARCHAR2(20), ATTR_3 VARCHAR2(20));
          CREATE TABLE Mob_Desc (NAME VARCHAR2(50), ATTR_1 VARCHAR2(20), ID NUMBER(20));      
          CREATE TABLE Mob_Main (NAME VARCHAR2(20), ATTR VARCHAR2(20), ID VARCHAR2(10));     
          
          insert into Mob_Attr(name, attr_1, attr_2,attr_3) values ('n1','aa',null,null);
          insert into Mob_Attr(name, attr_1, attr_2,attr_3) values ('n2','bb',null,null);
          insert into Mob_Attr(name, attr_1, attr_2,attr_3) values ('n3','cc',null,null);
          insert into Mob_Attr(name, attr_1, attr_2,attr_3) values ('n4','dd',null,null);
          
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n1','aa',10);
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n1','aa',15);
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n1','aa',123);
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n1','aa',1455);
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n2','bb',455);
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n2','bb',135);
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n3','cc',15);
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n3','cc',52);
          insert into Mob_Desc (NAME,ATTR_1,ID) values ('n4','dd',1455);
          
          merge into Mob_Main ma using
          (select d.name, d.attr_1,d.id from Mob_Attr a, Mob_Desc d
          where a.name = d.name and a.attr_1 = d.attr_1
          ) q on (ma.name=q.name and ma.attr=q.attr_1)
          when not matched then
          insert (NAME,ATTR,ID)
          values (q.name,q.attr_1,q.ID);
          
    Merge statement above will actually merge complete data. But I want that the first line will only get inserted to the base table (Mob_Main). If we take the "n1" name first row in the table with the ID Mob_Desc '10' should get only inserted. I go for a cursor to do what I have given huge volume, I prefer the merger instead.
    MERGE INTO Mob_Main ma
         USING (
                  SELECT distinct d.name, d.attr_1, first_value(d.id) over (partition by d.name, d.attr_1 order by d.rowid) id
                  FROM Mob_Attr a, Mob_Desc d
                  WHERE a.name = d.name AND a.attr_1 = d.attr_1
                 ) q
            ON (ma.name = q.name AND ma.attr = q.attr_1)
    WHEN NOT MATCHED
    THEN
       INSERT     (NAME, ATTR, ID)
           VALUES (q.name, q.attr_1, q.ID);
    COMMIT;
    
    select *
    from Mob_Main
    order by name, id;
    
    NAME                 ATTR                 ID
    -------------------- -------------------- ----------
    n1                   aa                   10
    n2                   bb                   455
    n3                   cc                   15
    n4                   dd                   1455      
    
    4 rows selected.
    
  • Subtotals - delete if there is only one line?

    I'm sure I know the answer to that, but is there a way of subtotals to remove if there is only one line? It doesn't seem to be any documented to do this, but I wonder if anyone has found a kind of workaround...? ... Registry entry?

    I am using Desktop, verision 10.1.2.2

    Thank you!

    Hello
    There is no global setting, but you can remove them on a basis of total per total.

    You change the total and check the box that says do not appear in total for a single line, but like I said you need to do this on a basis of total per total.

    Best wishes
    Michael

  • How can I make a cell formula will apply for the entire column? For example D2 appears B2 - C2. How can I copy this formula for each cell in the column?

    How can I make a cell formula will apply for the entire column? For example D2 appears B2 - C2. How can I copy this formula for each cell in the column?

    If you want the formula is the same (B2 - C2) in the cell of each column you must change it as ($B$ - 2$ C$ 2). Then copy it, select the whole column and paste.

  • I worked on a banner for my website.  I have my background layer, my image photo layer and I try to make my text layer.  I'm haven been able to do this all morning.  Now when I select horizontal T, place the cursor and type... I get only one

    I am designing a banner for my website.  I have a background layer, a layer of photo image and I try to create my text layer.  I select horizontal T, place the cursor in the desired position and type.  I get a horizontal line... no letters.  Can someone tell me what is the problem and how to solve this problem, so I can't see letters?  Thank you!

    Right now, your question is marked as "not responded". If my or anyone's answer solved your issue. Mark your question as answered and mark the answer displayed as 'correct', only you can do. It helps when the moderators of the forums of audit.

  • Traffic permitted only one-way for VPN-connected computers

    Hello

    I currently have an ASA 5505.  I put up as a remote SSL VPN access. My computers can connect to the VPN very well.  They just cannot access the internal network (192.168.250.0).  They cannot ping the inside interface of the ASA, nor any of the machines.  It seems that all traffic is blocked for them.  The strange thing is that when someone is connected to the VPN, I can ping this ASA VPN connection machine and other machines inside the LAN.  It seems that the traffic allows only one way.  I messed up with ACL with nothing doesn't.  Any suggestions please?

    Pool DHCP-192.168.250.20 - 50--> for LAN

    Pool VPN: 192.168.250.100 and 192.168.250.101

    Outside interface to get the modem DHCP

    The inside interface: 192.168.1.1

    Courses Running Config:

    : Saved

    :

    ASA Version 8.2 (5)

    !

    hostname HardmanASA

    activate the password # encrypted

    passwd # encrypted

    names of

    !

    interface Ethernet0/0

    switchport access vlan 20

    !

    interface Ethernet0/1

    switchport access vlan 10

    !

    interface Ethernet0/2

    switchport access vlan 10

    !

    interface Ethernet0/3

    Shutdown

    !

    interface Ethernet0/4

    Shutdown

    !

    interface Ethernet0/5

    Shutdown

    !

    interface Ethernet0/6

    Shutdown

    !

    interface Ethernet0/7

    switchport access vlan 10

    !

    interface Vlan1

    No nameif

    no level of security

    no ip address

    !

    interface Vlan10

    nameif inside

    security-level 100

    IP 192.168.250.1 255.255.255.0

    !

    interface Vlan20

    nameif outside

    security-level 0

    IP address dhcp setroute

    !

    passive FTP mode

    DNS lookup field inside

    DNS domain-lookup outside

    pager lines 24

    Within 1500 MTU

    Outside 1500 MTU

    mask 192.168.250.100 - 192.168.250.101 255.255.255.0 IP local pool VPN_Pool

    ICMP unreachable rate-limit 1 burst-size 1

    don't allow no asdm history

    ARP timeout 14400

    Global interface 10 (external)

    NAT (inside) 10 192.168.250.0 255.255.255.0

    Timeout xlate 03:00

    Timeout conn 01:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02

    Sunrpc timeout 0:10:00 h323 0:05:00 h225 mgcp from 01:00 0:05:00 mgcp-pat 0:05:00

    Sip timeout 0:30:00 sip_media 0:02:00 prompt Protocol sip-0: 03:00 sip - disconnect 0:02:00

    Timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute

    timeout tcp-proxy-reassembly 0:01:00

    Floating conn timeout 0:00:00

    dynamic-access-policy-registration DfltAccessPolicy

    the ssh LOCAL console AAA authentication

    Enable http server

    http 192.168.250.0 255.255.255.0 inside

    No snmp server location

    No snmp Server contact

    Server enable SNMP traps snmp authentication linkup, linkdown cold start

    life crypto ipsec security association seconds 28800

    Crypto ipsec kilobytes of life - safety 4608000 association

    Telnet timeout 5

    SSH 192.168.250.0 255.255.255.0 inside

    SSH timeout 5

    SSH version 2

    Console timeout 0

    dhcpd dns 8.8.8.8

    !

    dhcpd address 192.168.250.20 - 192.168.250.50 inside

    dhcpd allow inside

    !

    a basic threat threat detection

    Statistics-list of access threat detection

    no statistical threat detection tcp-interception

    WebVPN

    allow outside

    SVC disk0:/anyconnect-win-2.5.2014-k9.pkg 1 image

    SVC disk0:/anyconnect-macosx-i386-2.5.2014-k9.pkg 2 image

    Picture disk0:/anyconnect-linux-2.5.2014-k9.pkg 3 SVC

    enable SVC

    tunnel-group-list activate

    attributes of Group Policy DfltGrpPolicy

    value of server DNS 8.8.8.8

    Protocol-tunnel-VPN IPSec l2tp ipsec svc webvpn

    tunnel-group AnyConnect type remote access

    tunnel-group AnyConnect General attributes

    address pool VPN_Pool

    tunnel-group AnyConnect webvpn-attributes

    enable AnyConnect group-alias

    !

    class-map inspection_default

    match default-inspection-traffic

    !

    !

    type of policy-card inspect dns preset_dns_map

    parameters

    maximum message length automatic of customer

    message-length maximum 512

    Policy-map global_policy

    class inspection_default

    inspect the preset_dns_map dns

    inspect the ftp

    inspect h323 h225

    inspect the h323 ras

    Review the ip options

    inspect the netbios

    inspect the rsh

    inspect the rtsp

    inspect the skinny

    inspect esmtp

    inspect sqlnet

    inspect sunrpc

    inspect the tftp

    inspect the sip

    inspect xdmcp

    !

    global service-policy global_policy

    context of prompt hostname

    no remote anonymous reporting call

    call-home

    Profile of CiscoTAC-1

    no active account

    http https://tools.cisco.com/its/service/oddce/services/DDCEService destination address

    email address of destination [email protected] / * /

    destination-mode http transport

    Subscribe to alert-group diagnosis

    Subscribe to alert-group environment

    Subscribe to alert-group monthly periodic inventory

    monthly periodicals to subscribe to alert-group configuration

    daily periodic subscribe to alert-group telemetry

    Cryptochecksum:30fadff4b400e42e73e17167828e046f

    : end

    Hello

    No worries

    As we change the config I would do as well as possible.

    First, it is strongly recommended to use a different range of IP addresses for VPN clients and the internal network

    No VPN_Pool 192.168.250.100 - 192.168.250.101 255.255.255.0 ip local pool mask

    mask 192.168.251.100 - 192.168.251.101 255.255.255.0 IP local pool VPN_Pool

    NAT_0 ip 192.168.250.0 access list allow 255.255.255.0 192.168.251.0 255.255.255.0

    NAT (inside) 0-list of access NAT_0

    Then give it a try and it work note this post hehe

  • How to get all the records for each group - double

    Hi all

    I have developed customized reports, I have a three for each group, the first group is for PO number and the second is for line number Po and the third is for activity ID.


    Today the third group is based on the activity ID.

    Some time the activity id is unique and other data are different. If at this time its settlement only one record.

    For example

    Date of activity Id

    1 25 - Jan

    1 26 - Jan



    Its single record display.

    Can someone tell me how to avoid this separate for each group.

    Thanks and greetings
    Srikkanth.M

    As another user said, delete syntax regroup.
    Why do you bring here?

  • Cannot install adobe get "only one instance of this application can run.

    A month ago, I had to replace my hard drive and had to start re install everything.  I need adobe for many reasons, but more important still to read & Create PDFs.

    I tried to install it but get this message "that only one instance of this application can run.

    I see all the Adobe apps, I tried to remove all of the adobe files and still nothing.

    I also went on the Adobe Web site and it says this error message was due to the flash application, but I deleted all the files in and still nothing.

    Help, please!

    Roxanne

    I can't install the file that comes from the download link.

    Instead I had to install the Enterprise version. This fixed my issue. I bookmarked this site, next time there is an update I'll link again.

    https://get.Adobe.com/reader/Enterprise/

  • How select only one line

    Hello
    I have a select query that returns a couple of lines.
    now, I would like for the query to return only one row (the first match it can find).
    How do I do that?
    Thank you!

    my sample of my data as below, the registration of the first and the second is equal and I want the column of the first row and ignore the second row.


    9410 20110812 84A8E46E8C97
    9420 20110813 84A8E46E8C97
    84A8E46E8C6E 20110816 9410
    9400 20110819 84A8E46E8AFA

    You can try

      SELECT msid, bsid, starttime
        FROM (SELECT msid, bsid, starttime, ROW_NUMBER () OVER (PARTITION BY msid ORDER BY msid, starttime) rn FROM aaa_bill)
       WHERE rn = 1
    ORDER BY 1, 3
    
  • Requirement of Beeping - how to get subtotals for each combination of 2 columns val

    Hi gurus, Experts and all,.

    Help me please with my reporting requirement, on how to code this in PIF. Thank you.

    Requirement: I need to get the subtotals for each value of the combination of two columns.

    Columns example: team group AMOUNT

    Sample column values: placed Team1 100
    Group b... Team2... 200

    GroupA - Team1 Subtotals = 500 (value of the sample only)
    GroupA - Team2 Subtotals = 400 (value of the sample only)
    Group b - Team1 Subtotals = 600 (value of the sample only)
    Group b - Team2 Subtotals = 200 (value of the sample only)

    GrandTotal = 1700

    Thank you.

    Jean Paul
    BEEP newbie

    Published by: user10955574 on October 28, 2010 05:40
    
     -  - 
    
    

    output for data

    GROUPA - TEAM1 - 200
    GROUPB - TEAM1 - 300
    GROUPC - TEAM2 - 400
    GROUPD - TEAM2 - 500
    GROUPA - TEAM3 - 600
    GROUPB - TEAM3 - 700
    GROUPC - TEAM4 - 800
    GROUPD - TEAM4 - 900
    GROUPA - TEAM5 - 1000
    

Maybe you are looking for

  • How to change the music of the film

    On my Panel sheet music pro logic, every note is set to triplets, but my notes are in fact not triplets. How can I fix? Thank you very much!

  • Could not save the WRT54G Router settings!

    Recently, I have reset the Linksys WRT54G Router because I can't get the page with a note to "CONTINUE", I used to have. I can also save the new setting. What comes out is a blank page. Pls help me. Thank you.

  • Windows Media Player 11 album art is missing

    Hi, this is a mystery, but suddenly and without reason obvious, almost half of my albums do not show all arts album no matter what view, I use. However, when I browse through the files in Windows Explorer, I see that images (Folder.jpg, AlbumArtSmall

  • Windows Server 2012 on PE2950

    I have an old PE2950 I put Windows Server 2012.  When I enter my service tag (xxxxxxx) I don't see an option to download drivers for PERC 5 controller / i. Can someone me link to the correct drivers? Thank you!

  • Activation of Vista problems

    Vista Home Premium installed with the computer.  You will need to get Vista reinstalled because of problems, reinstalled School Home Basic with serial number. Now cannot access computer, no idea how to uninstall and reinstall Premium?