Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8050337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:04:11+00:00 2026-06-05T07:04:11+00:00

So I am trying to create a query that returns account numbers that are

  • 0

So I am trying to create a query that returns account numbers that are associated with more than one account.

When I run the code

SELECT accountNumber
FROM tbl1
WHERE LabelId = 328

I get the following result:

601209.1
601212.1
601216.1
624601.1
624601.2
624601.3
624601.4
624861.1
624861.2
624861.3
624861.4
624961.1
624961.2
624961.3
624961.4
624962.1
624962.2
624962.3
624962.4
624962.5
624963.1
624963.2
624963.3
624963.4
624963.5
624963.6
624963.7
624963.8
624963.9

So here we can see that account number 624601, 624921, 624861, 624961, 624962, and 624963 all have more than one account associated with them.
In order to fix this I tried this query:

SELECT FLOOR(accountNumber) AS [Account Number]
FROM tbl1
WHERE LabelId = 328

Which partly does what I need it to do, where it shows me just the account numbers, where I am getting stuck is counting the accounts that show up more than 2 times.

Thanks,
F

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:04:12+00:00Added an answer on June 5, 2026 at 7:04 am

    You could use Having (http://en.wikipedia.org/wiki/Having_(SQL))

    SELECT FLOOR(accountNumber) AS [Account Number]
    FROM tblClientAccount
    WHERE PrivateLabelSeqId = 328
    GROUP BY floor(accountNumber)
    Having Count(0) > 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a query that returns the an account name of the
I am trying to create a query which returns offers for all rows that
I'm trying to create a query that returns the closest (above) price for each
I'm trying to create a query that pulls information about sellers from my database,
I'm trying to create a query that will update the value of rgn_no and
I'm trying to create a created_at query range that will capture all records created
I am trying to create Linq Expression that I can use to query child
I am trying to create a query that allows me to get the sum
I need to create a view or a table valued function that returns one
I want to create a mysql query that returns a result that is ordered

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.