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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:05:11+00:00 2026-05-24T08:05:11+00:00

I have this at the moment: SELECT de.id, d.name, de.title discos_events de INNER JOIN

  • 0

I have this at the moment:

SELECT de.id, d.name, de.title discos_events de
INNER JOIN places d ON (de.dID = d.id)
WHERE unix_timestamp(now()) > de.date
LIMIT 10

This shows me the latest 10 events.

So no matter if the 10 events comes from the same place (dID), it still shows 10..

Now I want it to show 1 latest event per place.

So if theres 20 events 10 is from dID 1 and 10 is from dID 2 it should output one event from each place, so that would be 2 events in total. And these two events are the latest one (unix_timestamp(now()) > de.date)

  • 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-24T08:05:11+00:00Added an answer on May 24, 2026 at 8:05 am

    Assuming you don’t have two events for the same id at the same date:

    SELECT de.id, d.name, de.title 
    FROM discos_events de INNER JOIN places d ON (de.dID = d.id) 
    WHERE de.date = (SELECT MAX(t.date)
                     FROM disco_events t
                     WHERE t.dID = de.dID
                           AND unix_timestamp(now()) > t.date)
    LIMIT 10;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is query I have at the moment: SELECT `groups`.`id`, `groups`.`name`, `groups`.`description`, `groups`.`members`, `groups`.`image`,
Have this query: SELECT HOUR( DATE ) AS hr, COUNT( * ) AS cnt
We have this on mysql: **And want return with 2 limit:** 1- SELECT *
I have this query: $events = db_query(SELECT e.name, e.event_date, e.time, e.data, e.picture, e.event_type, v.latitude,
at the moment i have this <div id=beau> <div> <input type=text id=lun name=lun size=24
I have this script at the moment, which changes an image when a thumbnail
At the moment I have this code which fires a projectile: Vector3 d =
I have two nested loop in XSL like this, at this moment I use
This is what I have at the moment. <h2>Information</h2>\n +<p>(.*)<br />|</p> ^ that is
At the moment when i use this, i have to re-launch the app to

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.