ICP 7 - PavankumarManchala/BigDataProgrammingICPs GitHub Wiki
Submitted By:
Pavankumar Manchala
Class ID: 16
Installed the Apache Cassandra-2.0.15 in my Cloudera virtual machine and configured the Cassandra. The steps to configure the Cassandra are given below.
Given in the question first we need to create a keyspace and perform the queries.
- List the empno,ename,jobtitle,and hiredate of employee from the employee table. First I created a keyspace "test" and then the query is shown below,
Here we created a table emp with ID as primary key and inserted records into it.
Altered the table by adding Salary field to the employees and updated salaries for all.
- List the name,salary of the employees who are clerks. Here updated the Jobtitle as Clerk for one of the employee.
Here displayed the all fields and records of the test.emp table.
-
List the name, salary, jobtitle for every employee joined on '2000-02-17'. For this we displayed the employees who are joined on '2000-02-17' using where clause.
-
List name and annual salary of all the employees.
-
List the department name and department numbers for departments having deptno=5 For this first we altered the table by adding the deptno and department_name as fields to employees. Then we updated the values to those deptno and department_name fields. Then listed the employees who are having deptno=5
-
List the employees who are having deptno>3 and hiredate='2000-02-17'
Display employees’ names, salary and manager values of those employees whose salary is 10000 from EMP table using SELECT statement.