• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Datannum

"Empowering Insights, Unleashing Possibilities - Datannum.com"

  • Home
  • Microsoft Excel (spreadsheet) forum
    • Project: Analyze NYSE Data
  • SQL forum
    • Project: Query a Digital Music Store Database
  • Data Visualization
    • Project: Data Visualization Project using Tableau
    • IBM – Cognos Analytics/Planning Analytics/Cognos Controller with Watson
  • Linear Algebra forum
    • Curated resource to learn linear algebra
  • Hire Us/Support

If this is a valid SQL syntax, what does it do?

Data Science/Business Analytics for Small Business Applications › Forums › SQL › If this is a valid SQL syntax, what does it do?

Tagged: COUNT clause in SQL

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • August 8, 2022 at 1:07 pm #434
    Admin
    Keymaster

      I mistakenly came out with this query:

      SELECT DISTINCT COUNT (business_id)
      FROM hours
      

      The above did come out with result, which is count of all the business-ids of the table. I understand it should then be a valid syntax. Any explanation will be helpful, especially how it is different from the below query.

      My query should have been:

      SELECT COUNT (DISTINCT business_id)
      FROM hours
      

      Reply


      If this is a valid SQL syntaxt, what does it do?

    • Author
      Posts
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Primary Sidebar

    profile for Techcosec Limited on Stack Exchange, a network of free, community-driven Q&A sites

    RSS CS50’s Introduction to Computer Science by Harvard University on Edx

    Subscribe via Email

    Enter your email address to subscribe and receive notifications of new posts by email.

    This website hosted on WP Engine

    Footer

    Hosted on WP Engine

    Powered by
    • Terms
    • Privacy
    • Disclaimer