public virtual async Task Functions_CountDistinct()
        {
            using (var tempTable = await DataTestHelpers.CreateAutoIncrementTable(DataProvider))
            {
                await DataProvider.ExecuteNonQueryAsync(QueryExpression.Insert(
                                                            tempTable.TableName,
                                                            new[] { "Data" },
                                                            new object[] { 10 },
                                                            new object[] { 10 },
                                                            new object[] { 15 },
                                                            new object[] { 20 }
                                                            ));


                using (var queryResult = await DataProvider.ExecuteReaderAsync(
                           QueryExpression.Select(
                               new[] { QueryExpression.CountFunction(
                                           QueryExpression.Distinct(QueryExpression.Column("Data"))
                                           ) },
                               from: QueryExpression.Table(tempTable.TableName)
                               )))
                {
                    Assert.IsTrue(queryResult.HasRows);
                    Assert.IsTrue(await queryResult.ReadAsync());
                    Assert.AreEqual(3, queryResult.GetInt32(0));
                }
            }
        }
        public void Can_Write_Select_With_Distinct_Count()
        {
            var queryExpression = QueryExpression.Select(
                new[] { QueryExpression.Count(
                            QueryExpression.Distinct(QueryExpression.Column("Id"))
                            ) }
                );
            var sql = TestHelpers.ConvertToSql(queryExpression);

            Assert.AreEqual("SELECT COUNT(DISTINCT [Id]);", sql);
        }