Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10740 Articles
AmitDiwan
144 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Name varchar(20), -> Amount int -> ); Query OK, 0 rows affected (0.61 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('John', 200); Query OK, 1 row affected ... Read More
AmitDiwan
2K+ Views
Let us first create a table −mysql> create table DemoTable -> ( -> Id int, -> Name varchar(20), -> Age int, -> CountryName varchar(10) -> ); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command −mysql> insert into ... Read More
AmitDiwan
1K+ Views
Let us first create a table −mysql> create table DemoTable -> ( -> Id int, -> Name varchar(20) -> ); Query OK, 0 rows affected (0.69 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(100, 'Chris'); Query OK, 1 row affected ... Read More
AmitDiwan
1K+ Views
For this, you can use the aggregate function SUM() along with the GROUP BY clause. Let us first create a table −mysql> create table DemoTable -> ( -> EmployeeName varchar(20), -> JoiningDate date, -> Salary int -> ); Query OK, 0 rows affected (0.54 sec)Insert ... Read More
AmitDiwan
266 Views
For this, you can use the aggregate function SUM() along with the GROUP BY clause. Let us first create a table −mysql> create table DemoTable -> ( -> Name varchar(20), -> Value int -> ); Query OK, 0 rows affected (2.08 sec)Insert some records in the ... Read More
AmitDiwan
896 Views
For this, you can use FIND_IN_SET(). Let us first create a table −mysql> create table DemoTable -> ( -> ListOfValue varchar(20) -> ); Query OK, 0 rows affected (0.52 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('78, 89, 65'); Query OK, ... Read More
AmitDiwan
455 Views
For this, you can use AND operator with WHERE clause. Let us first create a table −mysql> create table DemoTable1616 -> ( -> StudentId int, -> StudentName varchar(20), -> StudentMarks int -> ); Query OK, 0 rows affected (0.44 sec)Insert ... Read More
AmitDiwan
1K+ Views
For this, you can use IF() along with aggregate function SUM(). Let us first create a table −mysql> create table DemoTable1617 -> ( -> Attendance varchar(20), -> CurrentYear int -> ); Query OK, 0 rows affected (0.48 sec)Insert some records in the ... Read More
AmitDiwan
292 Views
For this, you can use GROUP BY MONTH(). Let us first create a table −mysql> create table DemoTable1628 -> ( -> PurchaseDate date, -> Amount int -> ); Query OK, 0 rows affected (1.55 sec)Insert some records in the table using insert ... Read More
AmitDiwan
167 Views
Let us first create a table −mysql> create table DemoTable -> ( -> MonthNumber int -> ); Query OK, 0 rows affected (1.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10); Query OK, 1 row affected (0.14 sec) mysql> insert into ... Read More