473,386 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MYSQL inner join

1
I have a problem where in i wanna use inner join the table and execute these individual query in a single query.
PLEASE Advice!!!

Expand|Select|Wrap|Line Numbers
  1. //latest entry
  2. SELECT MAX( time )
  3. FROM jos_porsche_group_reading_task
  4. WHERE q_s_id = '86'
  5. AND group_content_id = '1'
  6.  
  7. //latest entry with score<>0
  8. SELECT MAX( time )
  9. FROM jos_porsche_group_reading_task
  10. WHERE q_s_id = '86'
  11. AND group_content_id = '1'
  12. AND score <>0
  13.  
  14. //latest entry with filename<>''
  15. SELECT MAX( time )
  16. FROM jos_porsche_group_reading_task
  17. WHERE student_id = '86'
  18. AND group_content_id = '1'
  19. AND filename<>''
Sep 28 '11 #1
1 1767
patjones
931 Expert 512MB
You're just dealing with one table. One possibility is to write these separate queries as sub-queries and JOIN them.
Sep 28 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Irlan agous | last post by:
Hello i have t tables reactie and form and this query $sql = "select reactie.persid,form.oproep,form.foto,form.id from reactie,form INNER JOIN reactie ON (reactie.persid = form.id) group by...
0
by: Jonathan Patton | last post by:
Hi,=20 I have a query that runs in Microsoft Access against my mysql database = just fine. It is:=20 =20 UPDATE discussion_categories AS discussion_categories_1=20 INNER JOIN...
0
by: B. Fongo | last post by:
------=_NextPart_000_0011_01C36322.2FEF5DC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable It works!=20 SELECT Customers.Name, Customers.City,...
3
by: Ike | last post by:
Oh I have a nasty query which runs incredibly slowly. I am running MySQL 4.0.20-standard. Thus, in trying to expedite the query, I am trying to set indexes in my tables. My query requires four...
11
by: news-east.earthlink.net | last post by:
The scenario: two tables CustomerTable --------------- CustomerID OrderID CustomerName CustomerEmail
1
by: GrungyApe | last post by:
I am new to this type of query and while I've found a lot of help on the forums, I am simply not getting it to work. Here is my attempt currently: SELECT DISTINCT(VADR.SUBSCRIBER_ID),...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
2
by: kjewell23 | last post by:
Hello. I'm trying to inner join two tables into one dataset. Is that possible. If so I do I do it. I have my code down below, so if you could help me. please!! I'm using asp.net for my coding Dim...
1
pradeepjain
by: pradeepjain | last post by:
Hii guys, I might be silly to ask this ques..but seriously i did not understand the outer join and inner join in mysql site.i understood left and right join also. can some one explain...
2
by: Joe Deluca | last post by:
Hi everyone, I am using the following query to retrieve member profile data: SELECT * FROM Members INNER JOIN MemberMartialArts on MemberMartialArts.mma_memberId = '$memberId'...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.