Tech Study

MySql

Populate city dropdown based on state dropdown

Introduction In this article, we will see how to populate city dropdown based on state dropdown using MVC and entity …

Read more

Write a MySQL query to extract the last 3 numbers from admission fees

Introduction Write a MySQL query to extract the last 3 numbers from admission fees. I have used phpMyAdmin for the …

Read more

Write a MySQL query to find all students where first names are in lower case

Introduction Write a MySQL query to find all students where first names are in lower case. I have used phpMyAdmin …

Read more

Write a MySQL query to find all students where first names are in upper case

Introduction Write a MySQL query to find all students where first names are in upper case. I have used phpMyAdmin …

Read more

Write a MySQL query to get the student id, email id (discard the last three characters)

Introduction Write a MySQL query to get the student id, email id (discard the last three characters) Write a MySQL …

Read more

Write a MySQL query to get the student id, first name and admission month

Introduction Write a MySQL query to get the student id, first name and admission month. I have used phpMyAdmin for …

Read more

Write a MySQL query to append ‘@example.com’ to firstname field

Introduction Write a MySQL query to append ‘@example.com’ to firstname field. I have used phpMyAdmin for the following Exercises. – …

Read more

Write a MySQL query to get details of the students where the length of the first name greater than or equal to 5

Introduction Write a MySQL query to get details of the students where the length of the first name greater than …

Read more

Write a MySQL query to update the Branch number in the stuents table, where firstname = John

Introduction Write a MySQL query to update the Branch number in the stuents table, where firstname = John. I have …

Read more

MySQL String Functions – Exercises

The following exercise will help you to improve your MySQL query skills effectively. I have used phpMyAdmin for the following …

Read more

Write a MySQL query to get the average fee for all students more than 2 students stuyding in same branch

Introduction Write a MySQL query to get the average fee for all students more than 2 students stuyding in same …

Read more

Write a MySQL query to get the branch ID and maximum fee of the students where maximum fee is greater than or equal to 1000

Introduction Write a MySQL query to get the branch ID and maximum fee of the students where maximum fee is …

Read more

Write a MySQL query to get the total salary, maximum, minimum, average salary of students(Branch ID wise), for Branch ID 111 only

Introduction Write a MySQL query to get the total salary, maximum, minimum, average salary of students(Branch ID wise), for Branch …

Read more

Write a MySQL query to get the average admission fee for each branch excluding ‘Computer Engineering’

Introduction Write a MySQL query to get the average admission fee for each branch excluding ‘Computer Engineering’. I have used …

Read more

Write a MySQL query to get Branch ID and the total admission fee of each branch

Introduction Write a MySQL query to get Branch ID and the total admission fee of each branch. I have used …

Read more

Write a MySQL query to get the difference between the highest and lowest salaries

Introduction Write a MySQL query to get the difference between the highest and lowest salaries. I have used phpMyAdmin for …

Read more

Write a MySQL query to get the number of students with the same branch

Introduction Write a MySQL query to get the number of students with the same branch. I have used phpMyAdmin for …

Read more

Write a MySQL query to get the highest, lowest, sum, and average salary of all students

Introduction Write a MySQL query to get the highest, lowest, sum, and average salary of all students. I have used …

Read more

Write a MySQL query to get the average fee and number of students studying in ‘Computer Engineering’

Introduction Write a MySQL query to get the average fee and number of students studying in ‘Computer Engineering’. I have …

Read more

Write a MySQL query to get the maximum admission fee from students table

Introduction Write a MySQL query to get the maximum admission fee from students table. I have used phpMyAdmin for the …

Read more

Write a MySQL query to get the minimum admission fee from students table

Introduction Write a MySQL query to get the minimum admission fee from students table. I have used phpMyAdmin for the …

Read more

Write a MySQL query to get the total admission fee of all students

Introduction Write a MySQL query to get the total admission fee of all students. I have used phpMyAdmin for the …

Read more

Write a MySQL query to list the number of branchs available in the student table

Introduction Write a MySQL query to list the number of branchs available in the student table. I have used phpMyAdmin …

Read more

Aggregate Functions and Group by – Exercises

The following exercise will help you to improve your MySQL query skills effectively. I have used phpMyAdmin for the following …

Read more

Write a MySQL query to select all records from students where last name in Smith, Johnson & Lee

Introduction Write a MySQL query to select all records from students where last name in Smith, Johnson & Lee. I …

Read more

Write a query to display the last name of employees having ‘e’ as the fourth character

Introduction Write a query to display the last name of employees having ‘e’ as the fourth character. I have used …

Read more

Write a MySQL query to display the last name of students whose name have exactly 5 characters

Introduction Write a MySQL query to display the last name of students whose name have exactly 5 characters. I have …

Read more

Write a MySQL query to display the firstname of all students who have both “a” and “i” in their first name

Introduction Write a MySQL query to display the firstname of all students who have both “a” and “i” in their …

Read more

Write MySQL query to display the firstname, lastname and admission date for all students who took admission in year 2016

Introduction Write MySQL query to display the firstname, lastname and admission date for all students who took admission in year …

Read more

Write a MySQL query to display the firstname, lastname and bramch ID of all student in branch 111 or 666 in ascending order

Introduction Write a MySQL query to display the firstname, lastname and bramch ID of all student in branch 111 or …

Read more

Write a MySQL query to display the firstname, lastname and fee for all students whose fee is not in the range 1000 through 1500

Introduction Write a MySQL query to display the firstname, lastname and fee for all students whose fee is not in …

Read more

MySQL Restricting and Sorting data examples

– students StudentId FirstName LastName Admission_fee Admission_date Branch 1 John Smith 1000 2018-06-10 Computer Engineering 2 David Jones 1200 2018-06-20 …

Read more

Write a MySQL to get first name of all students table after removing white spaces from both side

Introduction Write a MySQL to get first name of all students table after removing white spaces from both side. I …

Read more

Write a MySQL to get query to first 5 records from a table

Introduction Write a MySQL to get query to first 5 records from a table. I have used phpMyAdmin for the …

Read more

Write a query to get monthly admission fees of each and every student

Introduction Write a query to get monthly admission fees of each and every student. I have used phpMyAdmin for the …

Read more

Write a MySQL query to calculate 401*14+1025-500

Introduction Write a MySQL query to calculate 401*14+1025-500. I have used phpMyAdmin for the following example. SELECT 401 *14 +1025 …

Read more

Write a query get the first 3 characters of first name from students table

Introduction Write a query get the first 3 characters of first name from students table. I have used phpMyAdmin for …

Read more

Write a MySQL query get all first name from students table in upper case

Introduction Write a MySQL query get all first name from students table in upper case. I have used phpMyAdmin for …

Read more

Write a MySQL query get all first name from students table in lower case

Introduction Write a MySQL query get all first name from students table in lower case. I have used phpMyAdmin for …

Read more

Write a MySQL query to get the number of students studying in the institute

Introduction Write a MySQL query to get the number of students studying in the institute. I have used phpMyAdmin for …

Read more

Write a MySQL query to get the average admission fee and number of students in the students table

Introduction Write a MySQL query to get the average admission fee and number of students in the students table. I …

Read more

Write a MySQL query to get the maximum and minimum admission fee from students table

Introduction Write a MySQL query to get the maximum and minimum admission fee from students table. I have used phpMyAdmin …

Read more

Write a MySQL query to get the total admission fee of students

Introduction Write a MySQL query to get the total admission fee of students. I have used phpMyAdmin for the following …

Read more

Write a query to get the student ID, names (firstname, lastname), admission Fee in ascending order of admission Fee

Introduction Write a query to get the student ID, names (firstname, lastname), admission Fee in ascending order of admission Fee. …

Read more

Write a MySQL query to get the names (firstname, lastname), Fee, Scholarship of all the student (Scholarship is calculated as 15% of Admission Fee)

Introduction Write a MySQL query to get the names (firstname, lastname), Fee, Scholarship of all the student (Scholarship is calculated …

Read more

Write a MySQL query to get the details of all students according to first name in descending order

Introduction Write a MySQL query to get the details of all students according to first name in descending order. I …

Read more

Write a MySQL query to get unique branch from student table

Introduction Write a MySQL query to get unique branch from student table. I have used phpMyAdmin for the following example. …

Read more

Write a MySQL query to display the names (firstname, lastname) using alias name “First Name”, “Last Name”

Introduction Write a MySQL query to display the names (firstname, lastname) using alias name “First Name”, “Last Name”. I have …

Read more

MySQL basic SELECT statement – Exercises

The following exercise will help you to improve your MySQL query skills effectively. I have used phpMyAdmin for the following …

Read more