自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 记录安装hive和mysql的那些坑

1.先装mysql再装hive2.根据这篇博文安装mysql:https://www.jianshu.com/p/276d59cbc529安装过程debug:https://blog.csdn.net/zxlhaoren/article/details/88022523Remove Your MySQL Config File很有用3.查询错误日志:/usr/local/mysql/data/hadoop01.err使用命令/usr/local/mysql/support-files/mysql.

2020-09-17 00:22:09 234

原创 linux下卸载系统自带mysql出错解决

错误信息:[hadoop@hadoop01 mysql]$ rpm -e mysql-libs-5.1.73-5.el6_6.x86_64error: Failed dependencies: libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-6.el6_5.x86_64 libmysqlclient.so.16(libmysqlclient_16)(64bit) is neede

2020-09-13 23:20:45 203

原创 初装centos6net模式无法上网解决方法

参考:https://blog.csdn.net/gavin_chun/article/details/77132162

2020-08-31 21:39:06 302

原创 CRT连接Centos7配置IP,搭建集群时ping不通问题等解决

最近在学hadoop,记录一下自己用CRT连接虚拟机时遇到问题的处理方法。centos7将之前版本的默认网卡名改为了ensxx,可将其修改回eth01.用root用户登录(密码与配置的普通用户密码一样),在终端进入网卡配置所在目录,并查看目录下文件(我已经将网卡配置文件名改成了eth0,未改前是ifcfg-ens33)cd /etc/sysconfig/network-scriptsls2.修改网卡配置文件vim ifcfg-ens33[修改网卡配置文件:按insert切换修改模.

2020-08-20 16:15:43 948

原创 用正则爬取名言网——实现自动换页爬取及自动停止

# 导入库from urllib.request import urlopenimport re# 模拟浏览器发起请求url = 'http://quotes.toscrape.com/page/'for index in range(1, 30): uo = (url+str(index)+'/') response = urlopen(uo) # 获取网页内容 html_content = response.read().decode("utf-8")

2020-07-28 17:04:06 201

原创 用re库正则方法抓取名言网数据

写在前面:感谢马中华老师。# 导入库from urllib.request import urlopenimport re# 模拟浏览器发起请求url = 'http://quotes.toscrape.com/'# 第二页# url = 'http://quotes.toscrape.com/page/2/'# url = 'http://quotes.toscrape.com/page/3/'response = urlopen(url)# 获取网页内容html_content

2020-07-28 00:25:03 156

原创 信息设计先驱Edward Tufte-The Visual Display of Quantitative Information(2ed)

看《深入浅出数据分析》P129中写:“如果要寻找设计(图表的)灵感,可能需要看几本Edward Tufte写的书,他是数据图形化方面的最高权威”,遂想上淘宝等网站买一本来开开眼界,但根本没有全新,即使是初版的二手也要200起步,还信不过。于是多番寻找最后终于在外网找到了PDF格式的第二版,和大家分享一下。资源仅供学习使用,大家拿了资源的...

2020-07-17 11:04:33 1407 7

原创 SQLZOO:White Christmas

1.The units are 10th of a degree Celcius. The columns are yr and dy for year and day of month. The next twelve columns are for January through to December.Show the average daily temperature for August 10th 1964SELECT m8/10 FROM hadcet WHERE yr=1964 AND

2020-07-05 12:14:52 354

原创 牛客网sql实战:11-20

11.获取所有员工当前的(dept_manager.to_date=‘9999-01-01’)manager,如果员工是manager的话不显示(也就是如果当前的manager是自己的话结果不显示)。输出结果第一列给出当前员工的emp_no,第二列给出其manager对应的emp_no。select de.emp_no,dm.emp_no manager_nofrom dept_emp as de left join dept_manager as dmon de.dept_no=dm.dept_no

2020-07-04 17:21:13 227

原创 SQLZOO:COVID-19

The example uses a WHERE clause to show the cases in ‘Italy’ in March.Modify the query to show data from SpainSELECT name, DAY(whn), confirmed, deaths, recovered FROM covidWHERE name = 'Spain'AND MONTH(whn) = 3ORDER BY whn

2020-07-02 23:16:41 1405 11

原创 SQLZOO:Window functions

1.Show the lastName, party and votes for the constituency ‘S14000024’ in 2017.SELECT lastName, party, votes FROM ge WHERE constituency = 'S14000024' AND yr = 2017ORDER BY votes DESC在题目给出的范例基础上无脑改就完事了2.You can use the RANK function to see the orde

2020-06-27 21:07:26 531 2

原创 SQLZOO:8+ Numeric Examples

1.The example shows the number who responded for:question 1at ‘Edinburgh Napier University’studying ‘(8) Computer Science’Show the the percentage who STRONGLY AGREESELECT round(A_STRONGLY_AGREE/(A_STRONGLY_DISAGREE+A_DISAGREE+A_NEUTRAL+A_AGREE+A_

2020-06-26 20:51:46 433 3

原创 牛客网sql实战:1-10

1.查找最晚入职员工的所有信息,为了减轻入门难度,目前所有的数据里员工入职的日期都不是同一天select *from employeeswhere emp_no=10008;2.查找入职员工时间排名倒数第三的员工所有信息,为了减轻入门难度,目前所有的数据里员工入职的日期都不是同一天select * from employees where hire_date = (select distinct hire_date from employees

2020-06-25 21:05:40 181

原创 SQLZOO:Self join

1.How many stops are in the database.select count(name)from stops;2.Find the id value for the stop ‘Craiglockhart’SELECT IDFROM stopswhere name='Craiglockhart'3.Give the id and the name for the stops on the ‘4’ ‘LRT’ service.select id,namefrom s

2020-06-22 20:10:24 291

原创 SQLZOO:Using Null

1.List the teachers who have NULL for their department.Why we cannot use =You might think that the phrase dept=NULL would work here but it doesn’t - you can use the phrase dept IS NULLselect namefrom teacherwhere dept is null;

2020-06-21 14:56:54 202

原创 SQLZOO:More JOIN operations

2.Give year of ‘Citizen Kane’.select yrFROM movieWHERE title='Citizen Kane';3.List all of the Star Trek movies, include the id, title and yr (all of these movies include the words Star Trek in the title). Order results by year.select id,title,yrfrom

2020-06-20 17:01:56 211

原创 SQLZOO:Old JOIN Tutorial

2.Show the who and the color of the medal for the medal winners from ‘Sweden’.ttms(games,color,who,country)country(id,name)select who,colorfrom ttms join country on country=idwhere name='sweden';3.Show the years in which ‘China’ won a ‘gold’ medal

2020-06-20 14:01:46 301 1

原创 SQLZOO:The JOIN operation

1.The first example shows the goal scored by a player with the last name ‘Bender’. The * says to list all the columns in the table - a shorter way of saying matchid, teamid, player, gtimeSELECT * FROM goalWHERE player LIKE ‘%Bender’Modify it to show t

2020-06-20 02:47:32 226

原创 SQLZOO:SUM and COUNT

1.Show the total population of the world.world(name, continent, area, population, gdp)SELECT SUM(population)FROM world2.List all the continents - just once each.SELECT distinct(continent)from world;3.Give the total GDP of Africaselect sum(gdp)

2020-06-19 19:58:34 151

原创 SQLZOO:SELECT within SELECT Tutorial

SELECT within SELECT Tutorial1.List each country name where the population is larger than that of ‘Russia’.world(name, continent, area, population, gdp)SELECT name FROM worldWHERE population > (SELECT population FROM world WHERE name

2020-06-19 17:30:26 210

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除