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 8349213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:55:34+00:00 2026-06-09T07:55:34+00:00

My Table: table1 ID Name Family 1 A AA 2 B BB 3 A

  • 0

My Table: table1

ID  Name  Family
1   A     AA
2   B     BB
3   A     AB
4   D     DD
5   E     EE
6   A     AC

SQL command on Access:

select count(*) from table1

Output: ————> True
6 row(s)

I tried to count unique names:

Expected output: 4 row(s)

select count(distinct Name) from table1

Output on Access: ————> Error

What changes do I need to make to my query?

  • 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-09T07:55:36+00:00Added an answer on June 9, 2026 at 7:55 am

    Try this

    SELECT Count(*) AS N
    FROM
    (SELECT DISTINCT Name FROM table1) AS T;
    

    Read this for more info.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

DROP TABLE ( SELECT table_name FROM information_schema.`TABLES` WHERE table_schema = 'myDatabase' AND table_name LIKE
i have following table album_id | sub_album_id | name sdf2342 | 0 | family
I have 2 field in my table : Name , Family . I want
Assuming an InnoDB table, will the following command ... CHECK TABLE table_name; ... cause
Suppose you have these tables: Table Name: Salesman Fields: S_ID(Primary Key), Name Table Name:
Suppose i have a mysql table name table with fields rank date id The
I have the following two tables: Table1 ---------- ID Name 1 A 2 B
I have the following table drop table names; create table names( name varchar(200), surname
Using SQL server 2008. I have a family tree of animals stored in a
Into I have two tables profile and name , the profile table contains some

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.