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

  • Home
  • SEARCH
  • 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 7948931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:51:40+00:00 2026-06-04T01:51:40+00:00

I have got this query: SELECT * FROM `mfw_navnode` n1 WHERE (n1.node_name=’Eby’ OR n1.node_name=’Lana’

  • 0

I have got this query:

   SELECT *  FROM `mfw_navnode` n1
    WHERE  (n1.node_name='Eby' OR n1.node_name='Lana'  OR n1.node_name='MF' OR n1.node_name='Amur' OR n1.node_name='Asin' )
    GROUP BY n1.node_name

It has another field which is called time_added..that is basically the time of each row..I want to order the node_name (Select them), by the latest time I added them.

How do I do it? each node_name has a time.. but I want to group each node_name by the latest time it was added..

I thought to use MAX(time_added) and then add it to group by..but that gave me an error..

What could be a possible solution?

  • 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-04T01:51:41+00:00Added an answer on June 4, 2026 at 1:51 am

    If I understand the question, the following may be what you are looking for. It isn’t quite clear to me if you want them ordered with the latest times first or last (add DESC as needed):

    SELECT `node_name`,  max(`time`) `maxtime` FROM `mfw_navnode` n1 ...
            GROUP BY node_name order by `maxtime`;
    

    One thing to note is that the query in the OP, which includes fields not in the GROUP BY clause is ambiguous and is not allowed in most SQL implementations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have got that error and the line was this : $stations=$this->$db->query('SELECT * from
I got this Doctrine query: select upper(substring(e.name, 1, 1)) first_letter from Application\Models\Exercise e group
I have this query SELECT t1.Trans_ID FROM (SELECT * FROM Prune WHERE [Name]=I1) AS
I have got quite slow query (actually this is data loading from mysql.dump). Now
I have this query: SELECT I1 & , & I2 AS Item_set, Round(Sum([T1].Fuzzy_Value)/Count(*),15) AS
say I have this $result = mysql_query('SELECT views FROM post ORDER BY views ASC');
Well friends, I have got this query which works but is very long for
Got question. If i make query to server i use something like this: mysql_query(select
I have got the following exception when try to select data from SQL Server
I am using psql 8.1.18 on Glassfishserver. I have a query like this: select

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.