10 common Excel functions and their equivalent SQL functions

0

10 common Excel functions and their equivalent SQL functions

Here are 10 common Excel functions and their equivalent SQL functions:

...

1. VLOOKUP (Excel) - JOIN (SQL): SQL's JOIN operation allows you to combine data from multiple tables based on a common key, similar to Excel's VLOOKUP which retrieves data from another table based on a matching key.


2. IF (Excel) - CASE (SQL): Excel's IF function allows you to perform conditional operations. In SQL, the CASE statement serves a similar purpose, allowing you to perform conditional logic.


3. CONCATENATE (Excel) - CONCAT (SQL): In Excel, CONCATENATE joins text strings together. In SQL, CONCAT combines strings from columns or literals.


4. TEXT (Excel) - TO_CHAR (SQL): Excel's TEXT function formats a number as text with a specified format. In SQL, TO_CHAR formats dates and numbers as text with a specified format.


5. INDEX/MATCH (Excel) - SELECT (SQL): Excel's INDEX/MATCH combination allows you to look up a value in a table. In SQL, you use the SELECT statement to retrieve data from a table based on specified conditions.


6. SUMIF (Excel) - SUM with WHERE (SQL): Excel's SUMIF function adds up values that meet a specified condition. In SQL, you can achieve a similar result using the SUM function with a WHERE clause to filter rows based on a condition.


7. AVERAGEIF (Excel) - AVG with WHERE (SQL): Excel's AVERAGEIF calculates the average of values that meet a specified condition. In SQL, you can use AVG with a WHERE clause to accomplish a similar task.


8. COUNTIF (Excel) - COUNT with WHERE (SQL): Excel's COUNTIF counts cells that meet a specified condition. In SQL, you can use COUNT with a WHERE clause to count rows that meet specific criteria.


9. IFERROR (Excel) - NULLIF (SQL): Excel's IFERROR function allows you to specify a value or action if a formula results in an error. In SQL, you can use the NULLIF function to return NULL if a specific condition is met.


10. TODAY (Excel) - CURRENT_DATE (SQL): Excel's TODAY function returns the current date. In SQL, you can use the CURRENT_DATE function to obtain the current date.

...


Post a Comment

0 Comments
Post a Comment
>
To Top