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

Tags: Database

Similar Questions

  • 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

  • Hello! How can I disable only Bill emails for each Stock photo/graphic and move on to the monthly bill? Is this possible? THX.

    Everythime I upload a Photo or an Illustration Stock I received an E-Mail. Is it possible to swith to monthly delivery?

    Please come back to me

    Kind regards

    Alex

    Hi Alex,

    It's not a way to do this, but I have forwarded your request to the product team. Thanks for the suggestion.

    EBQ

  • In Thunderbird, I want to show a named Inbox for each account in the start menu, not only "Local Folders".

    I want a single Inbox for each account. i.e. explain "Hotmail" and the folder "Inbox" and "Cybernet1" and the "Inbox" folder, I have to search for each folder to show messages in that folder now and I prefer just to check the Inbox for each account. Jim

    In response to Zenos. See the attached picture. As you can see, I have two accounts in the local folders. I want to see the e-mail files in an Inbox under each account shown separately. See my answer to the gnospen for more information. Jim

  • Hi windows mail will open only 1 email from each file, i.e. Inbox, junk e-mail, sent, all folders, emails are always in the folders when I check properties I checked Show all messages

    Hi windows mail open only 1 email from each file, i.e. Inbox, junk, sent mail, all of these files. summer's fine for 3 years. Show msgs is checked.i can see in the properties of the Inbox I have 70 messages they are there but only 1 will open I see msgs in orange webmail, they say no problem for this purpose. I can also see them in users email location.worried man help

    Assuming that it is an email account POP3, go to the message store and see if the messages are really there.  They must be located under the directories for the folder names under the main directory of local folders in the message store.  The store is located under the Users\ [username] \AppData\Local\Microsoft\Windows Mail\ directory and is hidden, so first go to control panel | Folder options | View and uncheck Hide extensions of known file types (so you can distinguish the eml files which are messages) and check the option to show the hidden files and folders.  Then you can see if the messages are in fact always there or missing.  See here for background: www.oehelp.com/backup.aspx#wm and also here for what may have caused it: www.oehelp.com/OETips.aspx#3 as Bruce stated, if the messages are still on the server, you can set up your account again and then download them again.

    Steve

  • I have copy of old tbird and seamonkey e-mail files with the files and emails for each. I need to add to new tbird install. can not find a way to do it. Help

    I have copy of old tbird and seamonkey e-mail files with the files and emails for each. I need to add to new tbird install. can not find a way to do it. HELP PLEASE. previous e-mail files are under mail then mail.earthlink* .net and each of the five mail .net is an email address I have. I can't find a way to identify each file by email to the specific email address (IE mail.my E-mail name.net) so I can copy the files and emails from the past to the email addresses now under tbird. previous installed e-mail identities may not be the current configuration of e-mail files in tbird. I think that I must be sure that mail.name.net matches the previous mail.name.net to be able to copy and paste the old to the new. is there a way to find the file name correct the old email and correspond to the new? all my emails very important information are mostly in the old mail electronic id and must be available in the identification of email again (but same) how can I do this?

    http://KB.mozillazine.org/Importing_folders

    Use this module.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/ImportExportTools/

  • 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.

  • 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

  • Only one speaker (for both) to work (after checking the FAQ)

    Hello

    I have an inspiron N5110 R15 3 years now, a few days ago one of the speakers stopped working. When I do a test of stereo sound, the left speaker (the one that always works) its left AND RIGHT sample tones. so I figure this is on some kind of maybe Mono?

    -When I plug the headphones I have the sound on both sides.

    So far, I have tried

    1 reset

    2 tried update driver if the Device Manager

    3. turn on device

    4A ran the audio problems (win 7, 64 bits)

    5. looked around the frequently asked questions here

    * I do not uninstall the driver and downloaded a new because it seems strange to be the issue, after working for 3 years and all of a sudden it stops. you are the experts, so I'll gladly do if you say.

    current driver is manufactor (IDT high definition...)

    Thank you in advance.

    Another test, that you can run is ePSA Audio Quick Check. Note that not all ePSA and ePSA models do not all control by Audio fast. If you do not then just fail the color bar test as described in the FAQ. If you hear tones in the two speakers at the trials then the speaker itself is good and another part is the cause of the problem, probably the socket for headphones, since you know the audio working properly up to this day.

    If you hear only tones in one speaker and the other speaker is confirmed then failing or has a bad connection.

    The final test you can do is to perform a System Recovery. If it's a software problem then recovery will fix the problem and if it is material, then it will be no and hardware will be confirmed as the source of the problem. But no point in doing so, if only one speaker is heard in the previous test...

    icecoldnine
    I do not uninstall the driver and downloaded a new because it seems strange to be the issue, after working for 3 years and all of a sudden it stops.

    You need not to do because you tried the native driver which served the same purpose. A simple re-installation of the audio driver (no download) is that your settings will be lost - in other words, the default configuration is restored thus exclude a problem of configuration, such as defined as mono in the sound properties.

    If you want to check this, open the playback of the sound properties, right click on the speaker/headphones, select Properties, click the levels tab, click the Balance button. It does not matter how cursors are defined so that they are both the same level of the dB.

    Download a new copy of the pilot aims to eliminate corruption from the existing driver. Sometimes, they stop everything works correctly.

  • My name is Jason and I have Windows 7 and the latest version of flash, although I have no problem with my flash, flash requires administrator to ensure that all owners of copyright products flash will you please do one installable for each fl

    Please read above, thank you.

    What I mean is I want as an installer for each a Flash available that requires no (need) as an administrator to install.

    This way if for example a man by the name of Mack is a library and it is on the account invited library on a computer at the library, but it requires the latest version of flash to play a game online

    It can download the do not have to run as administrator in any new version of flash and install it and then he can play the flash game he wants to play.

    Hello

    Thank you for your comments, however, Flash Player saves files to and written in, the high file system locations, administrator rights are required for installation.

    --

    Maria

  • I pay for adobe cannot open soft, monthly cc only one possibility for a month after the locking of all the?

    I pay for monthly cc cannot open soft, adobe that one possibility for a month after all locked?

    Hi Noel, please try the steps mentioned below.

    1 disconnect and reconnect to creative cloud

    2 CC asking serial number

    3 CC back unexpectedly to the trial

    Let us know if any links are useful.

    Atul_Saini

  • I want only one application for now

    I have vascular Adobe Creative Cloud and want only an app for now which is Photoshop... I accidentally installed Lightroom, Bridge CC, Exchange Panel, Extendscript toolkit, extensions, touch app creative cloud plugins Manager and want to uninstall these applications until I have a full understanding of the creative cloud.

    I pay monthly membership and do not want to uninstall the creative cloud.

    Please advise on how to uninstall these other applications.

    Thank you.

    HI Margaret,.

    Please use the cleanup tool to remove the application you want to uninstall:

    http://helpx.Adobe.com/Creative-Suite/KB/CS5-cleaner-tool-installation-problems.html

    Choose the best option based on your decision.

    Kind regards

    Baudier

  • Observed only one IP for 11 GR 2 RAC SCAN, all the problems?

    Hello

    In one of our customers environment I've observed that they only used a single IP for RAC 11 GR 2 ANALYSIS, but wherever I know Oracle recommended to use 3 IPs to SCAN.

    There will be problems with the single use IP Scan instead of three?

    Please suggest.

    Thank you

    Mahi

    A single SCAN VIP (with the SCANL) would be necessary in fact to get the job of RAC 11.2. Three are recommended for environments where the only VIP SCAN isn't able to handle the workload. So there is nothing wrong in this moment with your configuration. It seems, you use a configuration of DNS to resolve the name SCAN and your guys N/W used a single IP address only to the name of SCANNING resolution.

    Aman...

  • Need help with signing off creative cloud, but he's stuck to me to check an email for an account I have not

    Any help would be appreciated! It was an old email account and he wants me to confirm a check, but I only have e-mail more!

    Change account https://forums.adobe.com/thread/1465499 can help

    -fake email https://forums.adobe.com/thread/1446019

  • New version of Thunderbird grabs all Mac addresses Mail instead of simply treat associated with the email for Thunderbird account. Why?

    Old version not shown contacts associated with the email address associated with Thunderbird. New version captures all THE addresses listed in my Mac Mail address book program. Is a huge list if I'm looking for an address or a specific person. A real pain! Any way to stop this?

    Problem solved. Just say Thunderbird is not to use this address book. All back to normal now...

Maybe you are looking for

  • Re: Satellite A100-409 tends to overheat

    Hello everyone, My Satellite A100-409 tends to overheat after a few minutes of use, just to watch my mail or browse the internet, use simple and normal.The mouse pad has a tendency to overheat as well. I try to keep my dust-free specifications, but i

  • Broken IPhone 5 charging port!

    So my IPhone was charging fine until randomly one day it just wouldn't load, I looked online to see what it could be and people said own port with a toothpick, toothbrush... etc so I tried that nothing has changed! My IPhone was low battery so some p

  • MacBook Air very slowly. How to fix.

    Hello.. I want to know why my Mac Book Air running slow? Already clear partition and install again. Any app or software installed. All new OS does X no DATA. But very slow. What is the problem? My camera; MacBook Air > CPU = Intel Core 2 Duo > 2 GB 1

  • Repeated KB981715 update

    The automatic Windows Update for Office 2007 (KB981715) repeatedly trys to install every time the computer is restarted.  How can I stop this from happening?

  • PREVENT SCREEN BLUE

    WHAT SITE IS BEST TO USE TO ELIMINATE THE SCREEN BLUE DEVIL