#' 检验是否存在重复行记录
#'
#' @param conn 连接
#'
#' @return 返回值
#' @export
#'
#' @examples
#' mrpt_res_checkDuplicate()
mrpt_res_checkDuplicate <- function(conn=tsda::conn_rds('jlrds')) {
sql <- paste0("select FYear,FPeriod,FBrand,FChannel,count(1)/44 as FCount from mrpt3_vw_FI_RPA
group by FYear,FPeriod,FBrand,FChannel
having count(1)/44 > 1
order by FYear,FPeriod,FBrand,FChannel")
data <- tsda::sql_select(conn,sql)
return(data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.