Skip to main content

Featured post

Python Top Libraries You Need to Create ML Model

Creating a Model of Machine Learning in Python, you need two libraries. One is 'NUMPY' and the other one is 'PANDA'.


For this project, we are using Python Libraries to Create a Model.
What Are Key Libraries You Need I have explained in the below steps. You need Two.
NUMPY - It has the capabilities of CalculationsPANDA - It has the capabilities of Data processing. To Build a model of Machine learning you need the right kind of data. So, to use data for your project, the Data should be refined. Else, it will not give accurate results. Data AnalysisData Pre-processing How to Import Libraries in Pythonimportnumpy as np # linear algebra
importpandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

How to Check NUMPY/Pandas installed After '.' you need to give double underscore on both the sides of version. 
How Many Types of Data You Need You need two types of data. One is data to build a model and the other one is data you need to test the model. Data to build…

SQL top ideas on how to use built-in functions correctly

In this post I am giving top examples on SQL functions. About built-in functions, I have covered in my previous post.
sql examples on built-in functions

List of Built-in Functions

  1. DATE-TIME functions
  2. Numeric functions
  3. Char functions
  4. Null-related functions

1. DATE/TIME functions

SELECT p_code, launch_dt, CURRENT_DATE FROM product;
CURRENT_DATE returns current date.

SELECT p_code, TO_CHAR(launch_dt, 'DD MONTH YYYY') reformatted_dt FROM product;
TO_CHAR function returns DATE in CHAR format.

2. Numeric functions

SELECT p_code, price, (price - 20), ABS(price - 20.00) FROM product;
ABS - function returns absolute value

SELECT p_code, price, ROUND (price, 1) FROM product;
ROUND function - Round to 1 digit.

SELECT p_code, price, SIGN(price - 15) FROM product;
SIGN function - It returns sign; either + or -

SELECT p_code, price, TRUNC(price, 1) FROM product;
TRUNC function - Truncates to a certain number of decimal places.

3. CHAR functions

SELECT p_code, CONCAT(CONCAT(p_name, ' -- ') , price) FROM product;
CONCAT function - concats two strings.

SELECT p_name, LOWER(p_name), UPPER(p_name) FROM product;
UPPER function returns upper case.
LOWER function returns lower case.

SELECT p_name, LENGTH(p_name) FROM product;
LENGTH function returns length of the string.

SELECT SUBSTR(phone, 3) FROM customer;
SUBSTR function returns sub string from main string.

4. Null related functions

SELECT p_name, price, min_price,
COALESCE((price * 0.9), min_price, 5.0) sale_price FROM product;

COALESCE function: returns first non-null value from the expression.

Summary
  • Given list of top built-in functions
  • Example SQL queries on built-in function given for you to read quickly
  • These examples are almost common in any RDBMS

Comments

Most Viewed

Hyperledger Fabric Real Interview Questions Read Today

I am practicing Hyperledger. This is one of the top listed blockchains. This architecture follows R3 Corda specifications. Sharing the interview questions with you that I have prepared for my interview.

Though Ethereum leads in the real-time applications. The latest Hyperledger version is now ready for production applications. It has now become stable for production applications.
The Hyperledger now backed by IBM. But, it is still an open source. These interview questions help you to read quickly. The below set of interview questions help you like a tutorial on Hyperledger fabric. Hyperledger Fabric Interview Questions1). What are Nodes?
In Hyperledger the communication entities are called Nodes.

2). What are the three different types of Nodes?
- Client Node
- Peer Node
- Order Node
The Client node initiates transactions. The peer node commits the transaction. The order node guarantees the delivery.

3). What is Channel?
A channel in Hyperledger is the subnet of the main blockchain. You c…