当前位置:网站首页>数据分析练习题
数据分析练习题
2022-07-03 08:13:00 【拒绝摆烂倒计时60天】
SQL篇
一、如图为直播表格
(1)使用sql查询直播间送礼数大于等于3的用户编号。
select DISTINCT(Uid) from dataanalysis GROUP BY Uid having sum(Num)>=3

(2)使用sql查询直播间送相同礼数大于等于2的用户编号。
select DISTINCT(Uid) from dataanalysis GROUP BY GiftName having sum(Num)>=2

二、如代码所示,分析myfunc函数的作用。
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int myfunc(int n){
int i=0;
int x=0;
while(i<n){
i+=1;
if(i%3==0)
continue;
x+=i;
printf("%d\n",x);
}
return x;
}
int main(){
int t=myfunc(6);
printf("%d",t);
return 0;
}
myfunc5函数的作用为:将不被3整除的大于等于1小于等于n的整数加和。
边栏推荐
猜你喜欢

Zohocrm deluge function application time verification

Get to know unity2 for the first time

Shader foundation 01

Iterm2 setting

Oracle queries grouped by time

Xlua task list youyou

L'installateur a été installé avec une erreur inattendue

璞华PLM为全场景产品生命周期管理赋能,助力产品主线的企业数字化转型

My touch screen production "brief history" 1

ArrayList
随机推荐
Maxcompute string splitting function -split_ PART
YOLO系列 --- xml2txt脚本
Unity one click AssetBundle
About Wireshark's unsuccessful installation of npcap
Transplantation of tslib Library
Huawei s5700 switch initialization and configuration SSH and telnet remote login methods
Dotween plug-in
A tunnel to all ports of the server
MaxCompute字符串分割函数-SPLIT_PART
Youyou1 of xlua knapsack system
go 解析身份证
超限黑客认知
Wechat native applet cloud development learning record 01
Ilruntime learning - start from scratch
Golang 字符串分割,替换和截取
JSON与Object之间转换
Haproxy+kept cluster setup 02
Oracle insert single quotation mark
Basic operation and process control 2
Base64编码简介