select count(registrationId) as registrationId,count(bookName) as bookName,count(author) as author,count(press) as press,
count(publicationNumber) as publicationNumber,count(pagesBindingArea) as pagesBindingArea,
count(source) as source,count(listAmount) as listAmount,count(price) as price,count(bookID) as bookID,
count(words) as words,
cast(cast(count(*)/((select count(*) from f_bookinfo)/1.00)*100 as decimal(18,2)) as nvarchar(10)
)+'%' from f_bookinfo
group by registrationId
这个是个统计分析查询 我想获得每列的值 而不是数量 应该怎么做啊?
谁有统计分析的示例啊 发上来看看多谢多谢了!
count(publicationNumber) as publicationNumber,count(pagesBindingArea) as pagesBindingArea,
count(source) as source,count(listAmount) as listAmount,count(price) as price,count(bookID) as bookID,
count(words) as words,
cast(cast(count(*)/((select count(*) from f_bookinfo)/1.00)*100 as decimal(18,2)) as nvarchar(10)
)+'%' from f_bookinfo
group by registrationId
这个是个统计分析查询 我想获得每列的值 而不是数量 应该怎么做啊?
谁有统计分析的示例啊 发上来看看多谢多谢了!
SqlCommand cmd= SqlCommand(sqlstring);
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
while(dr.Read())
{
//依次读出数据就可了
kongjian.Item.Add(dr["zhiduan"]); }
reader.Close();
conn.Close();
}