当前位置:网站首页>数据分析练习题
数据分析练习题
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的整数加和。
边栏推荐
- Wpf: solve the problem that materialdesign:dialoghost cannot be closed
- Generate video using clipout in viz engine
- Quelle est la définition? Qu'est - ce qu'une déclaration? Quelle est la différence?
- 璞华PLM为全场景产品生命周期管理赋能,助力产品主线的企业数字化转型
- 【cocos creator】点击按钮切换界面
- 什麼是定義?什麼是聲明?它們有何區別?
- 使用 FileChannel 进行文件的复制拷贝
- 一条通往服务器所有端口的隧道
- PIP uses image website to solve the problem of slow network speed
- 多旅行商问题——公式和求解过程概述
猜你喜欢

Easy touch plug-in

Iterm2 setting

Worldview satellite remote sensing image data / meter resolution remote sensing image

Unity2019_ Lighting system

Unity change default editor

Get to know unity2 for the first time

ArrayList
![[cocos creator] Click the button to switch the interface](/img/b8/f0fd54a2a197cbfd788990e2806b52.png)
[cocos creator] Click the button to switch the interface

Storage of data

Three characteristics
随机推荐
P2704 [noi2001] artillery position (shape pressure DP)
JS regular case-
Golang的range
Base64和Base64URL
数据库应用技术课程设计之商城管理系统
Three characteristics
Register keyword
Oracle insert single quotation mark
多旅行商问题——公式和求解过程概述
C#课程设计之员工信息管理系统
P1896 [scoi2005] non aggression (shape pressure DP)
Golang中删除字符串的最后一个字符
What does (+) in Oracle mean
Docker installs MySQL and successfully uses Navicat connection
Haproxy+kept cluster setup 02
Retail philosophy retail psychological warfare after reading -- 7-11 is a good product!
IP production stream is so close to me
Minimap plug-in
Scite change background color
链式长取值