2022暑期实习-特斯拉-笔试

公司:特斯拉

岗位:IT应用支持工程师实习生

笔试平台:Codility

考试时长:130分钟

考试题型:两道SQL,一道Python

Task1

You are given two tables, department and employee, with the following structure:

create table department (
 	dept_id integer not null,
 	dept_name varchar(30) not null,
	dept_location varchar(30) not null,
	unique(dept_id)
);

create table enployee (
	emp_id integer not null,
	emp_name varchar(50) not null,
	dept_id integer not null,
	salary integer not null,
	unique(emp_id)
);

Each record in the table department represents a department which might hire some employees. Each record in the table employee represents an employee who works for one of the departments from the table department. The salary of each employee is known. (However, the locations of the departments are not relevant here.)

Write an SQL query that returns a table comprising all the departments (dept_id) in the table department that hire at least one employee, the number of people they employ and the sum of salaries in each department. The table should be ordered by dept_id (in increasing order).

Task2

Codility is a company that creates programming tasks which are solved by candidates. After submitting their solution to a task, each candidate receives a report containing the number of points their solution scored, which is an integer between 0 and 100.

You are given two tables, tasks and reports, with the following structure:

0create table tasks (
	id integer not null,
	name varchar(40) not null,
	unique(id)
);

create table reports(
	id integer not null,
	task_id integer not null,
	candidate varchar(40) not null,
	score integer not null,
	unique(id)
);

Your task is to write an SQL query which assigns a difficulty rating to depends on the average score of all candidates' solutions submitted each task . The difficulty of the task depends on the average sc

剩余60%内容,订阅专栏后可继续查看/也可单篇购买

一个普通数据人的成长之路 文章被收录于专栏

记录实习和校招的笔试面试(标题年份表示笔试或面试的年份)和个人成长,牛友们的点赞、评论、收藏就是更新的动力和支持~

全部评论

相关推荐

昨天 15:12
门头沟学院 Java
别人在上班,我就在工位上看看视频啥的,这正常吗?
程序员小白条:实习就是摸鱼,只是公司指标,把你进来了,可能那时候客户很多,但等你进来的时候,已经是淡季了,根本没多少需求,或者说根本不适合实习生去完成,因此你就每天干坐着就行,可能1,2个月都没需求
实习生的蛐蛐区
点赞 评论 收藏
分享
05-14 20:34
门头沟学院 Java
窝补药贝八股:管他们,乱说,反正又不去,直接说680
点赞 评论 收藏
分享
06-13 17:33
门头沟学院 Java
顺序不记了,大致顺序是这样的,有的相同知识点写分开了1.基本数据类型2.基本数据类型和包装类型的区别3.==和equals区别4.ArrayList与LinkedList区别5.hashmap底层原理,put操作时会发生什么6.说出几种树型数据结构7.B树和B+树区别8.jvm加载类机制9.线程池核心参数10.创建线程池的几种方式11.callable与runnable区别12.线程池怎么回收线程13.redis三剑客14.布隆过滤器原理,不要背八股,说说真正使用时遇到了问题没有(我说没有,不知道该怎么回答了)15.堆的内存结构16.自己在写项目时有没有遇见过oom,如何处理,不要背八股,根据真实经验,我说不会17.redis死锁怎么办,watchdog机制如何发现是否锁过期18.如何避免redis红锁19.一个表性别与年龄如何加索引20.自己的项目的QPS怎么测的,有没有真正遇到大数量表21.说一说泛型22.springboot自动装配原理23.springmvc与springboot区别24.aop使用过嘛?动态代理与静态代理区别25.spring循环依赖怎么解决26.你说用过es,es如何分片,怎么存的数据,1000万条数据怎么写入库中27.你说用limit,那么在数据量大之后,如何优化28.rabbitmq如何批次发送,批量读取,答了延迟队列和线程池,都不对29.计网知不知道smtp协议,不知道写了对不对,完全听懵了30.springcloud知道嘛?只是了解反问1.做什么的?短信服务,信息量能到千万级2.对我的建议,基础不错,但是不要只背八股,多去实际开发中理解。面试官人不错,虽然没露脸,但是中间会引导我回答问题,不会的也只是说对我要求没那么高。面完问我在济宁生活有没有困难,最快什么时候到,让人事给我聊薪资了。下午人事打电话,问我27届的会不会跑路,还在想办法如何使我不跑路,不想扣我薪资等。之后我再联系吧,还挺想去的😭,我真不跑路哥😢附一张河科大幽默大专图,科大就是大专罢了
查看30道真题和解析
点赞 评论 收藏
分享
评论
2
14
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务