I tried. Adventureworks db of Msdn.
select HireDate, min(JobTitle) from AdventureWorks2016CTP3.HumanResources.Employee group by HireDate
Resuts:
2009-01-10Production Technician - WC40
2009-01-11Application Specialist
2009-01-12Assistant for CFO
2009-01-13Production Technician - WC50 <
It returns the sorted data of the tenant, but you do not rely on GROUP BY for SORT under any circumstances.
eg; indexes can modify this sorted data.
I added the following index (hiredate, jobtitle)
CREATE NONCLUSTERED INDEX NonClusturedIndex_Jobtitle_hireddate ON [HumanResources].[Employee] ( [JobTitle] ASC, [HireDate] ASC )
The result will change with the same select query;
2006-06-30 Production Technician - WC60
2007-01-26 Marketing Assistant
2007-11-11 Engineering Manager
2007-12-05 Chief designer of tools
2007-12-11 Tool Designer
2007-12-20 Marketing Manager
2007-12-26 Production Manager - WC60
You can download Adventureworks2016 at the following address
https://www.microsoft.com/en-us/download/details.aspx?id=49502