本套SQL题的答案是由许多小伙伴共同贡献的,1+1的力量是远远大于2的,有不少题目都采用了非常巧妙的解法,也有不少题目有多种解法.本套大数据SQL题不仅题目丰富多样,答案更是精彩绝伦! 注:以下参考答案都经过简单数据场景进行测试通过,但并未测试其他复杂情况.本文档的SQL主要使用Hive SQL. 一.行列转换 描述:表中记录了各年份各部门的平均绩效考核成绩. 表名:t1 表结构: a -- 年份 b -- 部门 c -- 绩效得分 表内容: a b c 2014 B 9 2015 A 8 20…
“用C语言写一个函数测试当前机器的大小端模式”是一个经典的笔试题,如下使用两种方式进行解答: 1. 用union来测试机器的大小端 #include <stdio.h> union test { int a; char b; }; int endian_test(void) { union test t1; t1.a = ; return t1.b; } int main(void) { int i = endian_test(); ) { printf("is little end…
笔试题: String strA = new String("123123");这一行中创建了几个String对象?? public class StringHeapCountTest { public static void main(String[] args) { String strA = new String("123123"); System.out.println(1); } } 这个题主要考察应试者对java内存结构(堆.非堆.栈.本地方法栈).堆中…