Open Database says it returns a DataTable.
That is, in JMP 15 can you do:
dt = Open Database(
"DSN=PI SQL Connection Lab;Description=PI SQL Connection Lab;UID=;Trusted_Connection=Yes;APP=JMP;WSID=SFX-5GCN2M1;DATABASE=LabData",
"select t.* from (select t.*, row_number() over (partition by SiteID, TimeStamp order by (select null)) as seqnum FROM dbo.CornOilManualEntryDataAvgsAll t WHERE t.\!"TimeStamp\!" >= DATEADD(d, -365, getdate())) t where seqnum = 1",
" Year dbo.CornOilManualEntryDataAvgsAll ORDER BY dbo.CornOilManualEntryDataAvgsAll.TimeStamp, dbo.CornOilManualEntryDataAvgsAll.SiteID",
"Year Manual Data"
);
// Change column info: TimeStamp
dt:TimeStamp << Data Type(
Numeric,
Format( "yyyy-mm-ddThh:mm:ss", 19, 0 ),
Input Format( "yyyy-mm-ddThh:mm:ss", 0 ),
Format( "m/d/y h:m", 19 )
) << Set Modeling Type( "Continuous" );