database - Finding Lowest Start DateTime and Highest End DateTime in each group by only EntryDate and Emp_id in MS SQL Server -


i want find

  • lowest "startdatetime"
  • highest "enddatetime"

when i'm grouping data

  • the date portion of "entrydate"(ignoring time portion)
  • "empl_id" in ms sql server

my data looks this **my records in table type:**

what results should like **i want result type:**

this ?

select emp_id, min (startdatetime), max (enddatetime)   yourtable group emp_id, convert(date, entrydate) 

Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -