Hot Topics
Teg Analytics Solution
Technical Round
- Question 1
Mostly about projects and sql basics
- Answer
SQL (Structured Query Language) is a standard language used to interact with relational databases, allowing you to manipulate and query data stored in tables. Some basic SQL concepts include:
SELECT – used to retrieve data from a database table
FROM – specifies the table the data should be retrieved from
WHERE – filters the results of the query based on specific conditions
INSERT – used to insert data into a table
UPDATE – used to modify existing data in a table
DELETE – used to remove data from a table
JOIN – combines rows from two or more tables based on a related column between them
As for projects, here are some steps you can follow to ensure a successful project outcome:
Define the project scope and objectives
Identify project stakeholders and their expectations
Develop a detailed project plan, including tasks, timelines, and resources needed
Assemble the project team and assign tasks
Monitor and control the project progress, making adjustments as needed
Communicate project status to stakeholders
Evaluate project success and document lessons learned for future reference.
- Question 2
Why analytics?
- Answer
Analytics is important because it helps organizations make informed decisions based on data and insights. With the increasing amount of data generated by businesses and consumers, analytics provides a way to collect, process, and analyze this data to uncover valuable insights. Some of the key benefits of analytics include:
Improved decision making – By analyzing data, organizations can gain a better understanding of their operations, customers, and market trends, which enables them to make more informed decisions.
Increased efficiency – Analytics can help organizations identify inefficiencies in their processes and make improvements, leading to increased efficiency and cost savings.
Competitive advantage – By leveraging analytics, organizations can gain a competitive advantage by understanding their customers and market trends better than their competitors.
Improved customer experience – Analytics can help organizations understand their customers’ behaviors, preferences, and pain points, which can inform improvements to the customer experience.
Improved risk management – By analyzing data, organizations can identify potential risks and take steps to mitigate them, leading to improved risk management.
Overall, analytics is a crucial tool for organizations to make data-driven decisions, improve their operations, and stay ahead of the competition.
- Question 3
SQL joins.
- Answer
SQL JOINs are used to combine rows from two or more tables based on a related column between them. There are several types of SQL JOINs, including:
INNER JOIN – returns only the rows that have matching values in both tables.
LEFT JOIN (or LEFT OUTER JOIN) – returns all the rows from the left table and the matching rows from the right table. If there is no match, the result will contain NULL values for the columns from the right table.
RIGHT JOIN (or RIGHT OUTER JOIN) – returns all the rows from the right table and the matching rows from the left table. If there is no match, the result will contain NULL values for the columns from the left table.
FULL OUTER JOIN – returns all the rows from both tables, including the matching and non-matching rows. If there is no match, the result will contain NULL values for the columns from either table.
CROSS JOIN – returns the Cartesian product of the two tables, i.e. it returns all possible combinations of rows from both tables.
The SQL JOINs are specified in the FROM clause of a SELECT statement, and the related column is specified using the ON keyword. For example, the following query uses an INNER JOIN to combine data from two tables, customers and orders, based on the customer_id column:
SELECT customers.name, orders.order_date
FROM customers
INNER JOIN orders
ON customers.customer_id = orders.customer_id;
- Question 4
What is primary key?
- Answer
Primary key is a constraint that should be unique and not null.
- Question 5
How to define class in python?
- Answer
In Python, a class is a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods).
Here’s a simple example of how to define a class in Python:
class Car:
def __init__(self, make, model, year):
self.make = make
self.model = model
self.year = year
def description(self):
return f"{self.year} {self.make} {self.model}"
In this example, the Car
class has three member variables: make
, model
, and year
. It also has a single method description
, which returns a string that describes the car. The __init__
method is a special method that is automatically called when an object of the class is created. It allows you to initialize the attributes of the object.
To create an object of the Car
class, you can write:
my_car = Car("Toyota", "Camry", 2020)
print(my_car.description())
This will output: 2020 Toyota Camry
.
- Question 6
Use of foreign key.
- Answer
Foreign key is use to maintain referential integrity.