473,394 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Select Email From Parent Table if it Exists More than 3 times in Child Table?

85 64KB
Dear all
i have 2 tables
table 1
email name
email1@gmail.com name 1
email3e3@gmail.com name 2

table 2
id email
1 email1@gmail.com
2 email1@gmail.com
3 email1@gmail.com
4 email3e3@gmail.com

i want to write query to select email from table 1 only if the email in table 2 exists more than 2.
any help will be greatly appreciated.
the output will be only
email1@gmail.com

Regards:
Dec 11 '14 #1
3 1449
Rabbit
12,516 Expert Mod 8TB
Run an aggregate query that returns the count grouping by email id and join that to table 1.
Dec 11 '14 #2
Mudassir
85 64KB
can you plz write a sample ??
Dec 12 '14 #3
Rabbit
12,516 Expert Mod 8TB
We try not to do the work for the asker because they are less likely to learn something useful. Please make an attempt and we can point you in the right direction.
Dec 12 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Kenneth Osenbroch | last post by:
Hi. I want to create a trigger that only allows delete from table A if corresponding record in table B does not exist. Any idea on how this can be done? Thanks, Kenneth.
2
by: fad | last post by:
Thanks for you Aaron but this code works with VBSCRIPT and I don't Know how to convert it to javascript>>>I want it with javascript not with VBSCRIPT -- fad...
0
by: Max | last post by:
Suppose we have an object hierarchy in XSD. For example, let us take Control, Label, TextBox and LinkLabel windows controls. Each control has some properties which are represented as elements....
4
by: Alfetta159 | last post by:
I've been setting up a schema with the XML Designer in VS .NET 2003. The designer lets me set up a lot of things including a complex type that contains an unnamed complex type called modified. ...
2
by: Vicki | last post by:
Using VS2005 beta 2, I have an xsd provided by a vendor that I want to make into a strongly typed data set. In VS 2003 the MSDataSetGenerator tool gives a similar error, which I was told was to be...
3
by: sam | last post by:
i get the following error while reading an xml into a dataset The same table cannot be the child table in two nested relation is there a solution for it
8
by: Richard L Rosenheim | last post by:
I have a dataset containing a parent table related to a child table. The child table contains an ID field (which is configured as autonumber in the datatable), the ID of the parent, plus some...
2
by: Bob | last post by:
I got three related datagrid views one parent and two children of the same. The two child tables contain many thousands of records and some of the contents are bitmap files in a sql server...
2
by: TruptiYadav | last post by:
i know the child table and i have the foreign key with me . but the DB2 script has been written by someone else and i dont know how to get the prant table name. is there any way to know the...
5
by: donnavz1 | last post by:
Good day. I am an auditor. I go out to sites to audit files (an audit instance). At each audit, I audit multiple files called certifications. Each certification has multiple findings. I have built...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.