Blogs Hub

by AskGif | Oct 18, 2020 | Category :coding

Reformat Department Table - Sql - Easy - LeetCode

Reformat Department Table - Sql - Easy - LeetCode

Table: Department +---------------+---------+<br />| Column Name &nbsp; | Type &nbsp; &nbsp;|<br />+---------------+---------+<br />| id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| int &nbsp; &nbsp; |<br />| revenue &nbsp; &nbsp; &nbsp; | int &nbsp; &nbsp; |<br />| month &nbsp; &nbsp; &nbsp

read more...

by AskGif | Oct 17, 2020 | Category :coding

Big Countries - Sql - Easy - LeetCode

Big Countries - Sql - Easy - LeetCode

There is a table World +-----------------+------------+------------+--------------+---------------+<br />| name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| continent &nbsp;| area &nbsp; &nbsp; &nbsp; | population &nbsp; | gdp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />+-----------------+----

read more...

by AskGif | Oct 16, 2020 | Category :coding

Rising Temperature - SQL - Easy - LeetCode

Rising Temperature - SQL - Easy - LeetCode

Table: Weather +---------------+---------+<br />| Column Name &nbsp; | Type &nbsp; &nbsp;|<br />+---------------+---------+<br />| id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| int &nbsp; &nbsp; |<br />| recordDate &nbsp; &nbsp;| date &nbsp; &nbsp;|<br />| temperature &nbsp; | int &nbsp; &

read more...

by AskGif | Oct 16, 2020 | Category :coding

Delete Duplicate Emails - SQL - Easy - LeetCode

Delete Duplicate Emails - SQL - Easy - LeetCode

Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. +----+------------------+<br />| Id | Email &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br />+----+------------------+<br />| 1 &nbsp;| john@example.com |<br

read more...

by AskGif | Oct 16, 2020 | Category :coding

Customers Who Never Order - Sql - Easy - LeetCode

Customers Who Never Order - Sql - Easy - LeetCode

Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers who never order anything. Table: Customers. +----+-------+<br />| Id | Name &nbsp;|<br />+----+-------+<br />| 1 &nbsp;| Joe &nbsp; |<br />| 2 &nbsp;| Henry

read more...

by AskGif | Oct 16, 2020 | Category :coding

Employees Earning More Than Their Managers - Sql - Easy - LeetCode

Employees Earning More Than Their Managers - Sql - Easy - LeetCode

The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id. +----+-------+--------+-----------+<br />| Id | Name &nbsp;| Salary | ManagerId |<br />+----+-------+--------+-----------+<br />| 1 &nbsp;| Joe &nbsp; |

read more...

by AskGif | Oct 16, 2020 | Category :coding

Second Highest Salary - Sql - Easy - LeetCode

Second Highest Salary - Sql - Easy - LeetCode

Write a SQL query to get the second highest salary from the Employee table. +----+--------+<br />| Id | Salary |<br />+----+--------+<br />| 1 &nbsp;| 100 &nbsp; &nbsp;|<br />| 2 &nbsp;| 200 &nbsp; &nbsp;|<br />| 3 &nbsp;| 300 &nbsp; &nbsp;|<br />+----+--------+<br />For example, given the

read more...

by AskGif | Oct 16, 2020 | Category :coding

Combine Two Tables - Sql - Easy - LeetCode

Combine Two Tables - Sql - Easy - LeetCode

Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people: Table: Person +-------------+---------+<br />| Column Name | Type &nbsp; &nbsp;|<br />+-------------+---------+<br

read more...

by AskGif | Aug 27, 2019 | Category :coding

Implementing MySQL Event Scheduler

Implementing MySQL Event Scheduler

If you are running large public web applications like shopping and emails portals, you have handled lots of unwanted data rows, for example, spam emails and unused shopping cart data. Sure it will create problem in database overload. So that I want to explain a simple tip called how to use MySQL

read more...

by AskGif | Aug 21, 2019 | Category :coding

Implementing Facebook Graph API Connect Using PHP and Jquery

Implementing Facebook Graph API Connect Using PHP and Jquery

This post I had presented in an easy way to connect and read the Facebook home timeline with PHP and Jquery. Explained how to store facebook token and user id hope you like it. &nbsp; Database Sample database table here storing facebook access token key and profile id. MyS

read more...

by AskGif | Aug 20, 2019 | Category :coding

Implementing Pagination Using Jquery, PHP, Ajax, and MySQL.

Implementing Pagination Using Jquery, PHP, Ajax, and MySQL.

A few days back I had posted an article Pagination with jQuery, MySQL, and PHP without refreshing page. I am modifying the old script and adding extra features like First, Previous, Next and Last buttons. Use it and enrich your web applications.&nbsp; &nbsp; Database MySQL

read more...