• 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

Why showing duplicate rows

Data Science/Business Analytics for Small Business Applications › Forums › SQL › Why showing duplicate rows

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • July 27, 2022 at 5:38 am #427
    Admin
    Keymaster

      er diagram

      Need to find all orders in 2015.

      Here is my query:

      SELECT orders.occurred_at, accounts.name, orders.total, orders.total_amt_usd
      FROM orders
      JOIN accounts
      ON orders.account_id = accounts.id
      JOIN web_events
      ON accounts.id = web_events.account_id
      JOIN sales_reps
      ON accounts.sales_rep_id = sales_reps.id
      JOIN region
      ON sales_reps.region_id = region.id
      WHERE orders.occurred_at BETWEEN '01-01-2015' AND '01-01-2016'

      Here is the output:
      SQL rows duplication

      Unable to figure out why showing duplicate rows. Just because I have joined more columns than actually needed for the problem creating this issue? Is so, an explanation will help how so. Any clue appreciated.


      Reply


      https://community.spiceworks.com/topic/2458634-why-showing-duplicate-rows?page=1#entry-10182771

    • 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