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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:23:24+00:00 2026-05-23T18:23:24+00:00

I have start to learn SQL now and now my question: Look at my

  • 0

I have start to learn SQL now and now my question:
Look at my uploaded image and say me how I can filter all product categorys with the id_product = 45 and my return value is 45-3,45-2 and the row 1 from product groups.

Again: I will have ALL product_groups rows (1,2,3) and the related id_category(product_category) with the id_product = 45.

It’s not easy to explain, sry for my bad English..

The two SQL Tables

Here is a SQL-Query who gives all rows with id from product_groups and id_product = 45 but NOT the id = 3 with empty values 🙁

SELECT 
  id, title, multiplayer, id_product 
FROM 
  product_category 
RIGHT OUTER JOIN products_groups ON 
  rg_product_category.id_category = products_groups.id 
WHERE 
  product_category.id_product = '45' OR 
  product_category.id_product IS NULL AND products_groups.type = 'Game';

thanks for all help

  • 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-05-23T18:23:25+00:00Added an answer on May 23, 2026 at 6:23 pm

    I think I understand what you want: You want to list all product_groups, with null values if there’s no match. Try this:

    SELECT 
      id, title, multiplayer, id_product 
    FROM  products_groups
    LEFT JOIN product_category
      ON product_category.id_category = products_groups.id 
      AND product_category.id_product = '45'
    WHERE products_groups.type = 'Game';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Learn sql and came the next question. How to implement a query to be
I have been asked to learn JDBC. I do not know where to start.
I start learn EF Fluent API. I have 2 simple POCO classes. public class
I want to start and learn coding to create a web application. I have
I start to learn Standard ML, and now I try to use Standard ML
Dear all. Today, I start to learn iOS. I don't know what tool I
I have recently start to learn WPF + MVVM. It is possible I have
I have start date and end date. I need to find out the day
I have a start of a webapp that I wrote without using the Object
I have to start a new project where user authentication/management will be required. A

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.