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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:41:24+00:00 2026-06-12T11:41:24+00:00

A table contains four columns server, directory, usage and datetime. All servers has got

  • 0

A table contains four columns “server”, “directory”, “usage” and “datetime”. All servers has got 10 dirs in common. I need to get the data for a server and it’s any dir the usage for the latest datetime in a day.
Say for example if there is a server A with directory B there will be Usage at multiple time for few days. I need the data to be reported by the query for all servers it’s all corresponding directory’s usage for the latest entry on each day.

  • 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-12T11:41:25+00:00Added an answer on June 12, 2026 at 11:41 am

    If I understood your question correctly, you want to see the last usage for every server and directory. Given a table named “usagestats” with the given columns that would be:

    SELECT a.server, a.directory, a.`usage`, a.datetime
        FROM usagestats as a INNER JOIN (
            SELECT server, directory, max(datetime) datetime
                FROM usagestats
                GROUP BY server, directory
            ) AS b ON (
                a.server = b.server
                and a.directory = b.directory
                and a.datetime = b.datetime
            )
        ORDER BY a.server, a.directory, a.datetime
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a question regarding a SQL-select-query: The table contains several columns, one of
I have a table (wp_postmeta), which contains four columns (meta_id, post_id, meta_key, meta_value). meta_key
i have four tables user-question contains two columns: questionID, userID, the questions that the
The database table only contains the four fields that the query is attempting to
Settings table contains always one row with lot of long-caption columns. Opening this in
I have a table with a few thousand rows. The table contains two columns,
I have a table with four columns, where col1 & col2 contain similar values
-- Pivot table with one row and four columns SELECT 'Values' tValues, ID,Name,ValueID,Value FROM
I have a table with four columns, say P_Key(int), Ref_Key(int), Key(String), Value(Integer). I want
Rows (id='row_property_'+number) in table contain four columns : select element (id='multiple_object_type_'+number) input type=text (id='multiple_instance_id_'+number)

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.