D 2019-04-02T11:52:03.600
J foundin Sqlite\s3.25\sand\snewer
J icomment Sqlite\s3.25\sintroduced\swindowing\sfunctions,\showever\sthey\sare\snot\susable\svia\sEF6\swith\sSqlite.\r\n\r\nusing\sEF6\swith\sSqlite\syou\scannot\suse\sSkip()\sat\sall\sand\scannot\suse\sGroupBy()\sin\sa\sway\sthat\swould\srequire\swindowing\sfunctions,\sas\sthey\sresult\sin\sa\sNotSupportedException.\r\n
\r\nFor\sexample,\s
Table.OrderBy(t\s=>\st.colname).Skip(50)\scould\sbe\stranslated\sto\r\n\r\n
\r\nselect\s*\r\nfrom\s(select\st.*,\r\n\s\s\s\s\s\s\s\s\s\s\s\s\srow_number()\sover\s(order\sby\st.colname)\sas\srownum\r\n\s\s\s\s\s\sfrom\stable\st)\r\nwhere\srownum\s>\s50\r\n\r\n
Table.GroupBy(t\s=>\st.col1).Select(g\s=>\sg.OrderBy(t\s=>\st.col2).First())\r\ncan\sbe\stranslated\sto\r\n
\r\nselect\st.*\r\nfrom\stable\st\r\njoin\s(\sselect\s*,\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\srow_number()\sover\s(partition\sby\scol1\sorder\sby\scol2)\srownum\r\n\s\s\s\s\s\s\sfrom\stable\s)\sx\son\st.id\s=\sx.id\r\nwhere\sx.rownum\s=\s1\r\n\r\n