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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:31:44+00:00 2026-06-02T18:31:44+00:00

I really need some help with some SQL. Question 1: It’s easy enough to

  • 0

I really need some help with some SQL.

Question 1:

It’s easy enough to get all “assets” that belong to a “presentation” if the asset has a corresponding “presentationid” within it’s table.

SELECT * FROM asset WHERE presentationid = 3

But how to I accomplish the same thing by joining? What’s the best way to say:

SELECT * FROM asset WHERE ... asset is connected to presentation via “presentationasset”:

TABLE asset
id
name

TABLE presentation
id
name

TABLE presenationasset
id
presentationid
assetid

I hope this makes sense. I want to list out all of the actual assets and their columns, not the association table. 🙂

Question 2: (not as important)

I have my application setup so that “presentation” is a class and “asset” is a class…

With question 1 in mind, how do I return each of the associated assets as “asset” objects? Or does that even matter?

  • 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-02T18:31:46+00:00Added an answer on June 2, 2026 at 6:31 pm

    Q1:

    SELECT a.id, a.name
    FROM asset a 
    JOIN presentationasset pa ON pa.assetid = a.id AND pa.presentationid = 3
    JOIN presentation p ON p.id = pa.presentationid
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We Really need some help on this one: We've Struggled with all the Apple
I have decided that I really need to get some flowcharts for reverse engineering
I need some help with a T-SQL query. I want to count fields that
All - I need some help designing a table for a Postgre SQL database.
sorry if you'll find this question stupid, but I really need help. Here's some
I really need some help in Regular Expressions, i'm working on a function like
I really need some help with this as I have been trying to fix
I'm new to java and really need some help. I created a command line
I'm new to MySQL so I really need some help with an issue I'm
I need some help in figuring a compiler error which is really driving me

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.