Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-2 votes
1 answer
50 views

Return only minimum record based on one column in a multiple join

I have a query with a couple of joins, and it's returning two records where I just want it to return one record for each acme_id, the minimum acme_client_id. (Or the minimum acme_client.client_id, I ...
tharpa's user avatar
  • 49
-1 votes
2 answers
230 views

Update temp table with min datetime of multiple columns

How can I update the following column "LowestFinishDate" in my #temp table to hold the absolute mininium value of columns ["Finished_OldDate", "Finished_NewDate" and &...
thatsweetguy's user avatar
2 votes
2 answers
154 views

How to find MIN with a duplicate value and replace MIN value with varchar

I'm trying to find the minimum value for a certain ID during a certain season and replacing that value with an abbreviation. I have these two tables: table: batplayerlevelyear table:...
Sam Birdsall's user avatar
1 vote
1 answer
67 views

Select data from first date following a specific date (two tables joined)

I've searched but can't seem to get this exactly where I need it. This is in regards to Microsoft SQL Server. I'm looking to join two tables, but only pull in data from the second table for the first ...
tandy's user avatar
  • 13
0 votes
1 answer
55 views

How do I retrieve a count of timestamps over the first hour of each shift?

Okay so this one might be tricky to explain.. What I am trying to do is count the number of loads within the first hour of each shift. What I mean by this is if loading starts at 0630, I want to ...
james's user avatar
  • 15