How to unpivot table: to this: What I have so far is : but this is giving me count for all months. I need this with month number and count value for that month. Values 1-9 could be any numbers. Answer Got it working with
Unable to get the balance sheet for the particular group of users. how can i be doing it
user_id created_at status amount _____________________________________________ 10196 31-08-2019 15:38 billcreated 21900 10196 05-09-2019 05:40 billpaid 43800 10196 15-12-2019 …
multiple selection in the where clause
I need to do multiple selection in the where clause select * from BATS where REASON in case when :P12_REASON = ‘Rejects’ then (‘online’, ‘offline’) else ” end and case when :P12_REASON = ‘…
SQL : Error 1064 in my query, i cannot find why
I’ve got this to create a trigger: CREATE TRIGGER `create_account` AFTER INSERT ON `Client` FOR EACH ROW BEGIN SET @lastID = ( SELECT C.idClient FROM …
Finding data about Collection in Object SQL (Oracle)
I have Object table COMPANIES with a collection of Employees. The code you can see below. What is a query to find the company with the largest number of employees? How much there are employees with a …
Trying to Full Join two tables in MySql
I was trying to full join to tables as the code below, SELECT C.cust_name,O.ord_num FROM customers C FULL JOIN orders O ON C.cust_code = O.cust_code; but this code is not working.Is anyone can …
mysql, Data for the last 3 months, including zeros
Consider the following schema: CREATE TABLE IF NOT EXISTS `numbers` ( `number` int(20) UNSIGNED NOT NULL AUTO_INCREMENT, UNIQUE KEY `number` (`number`) ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT …
How to write a Query to find out if the item has been purchased in the last year
I have a table ,where I have fields like Item and Purchase date. There are multiple entries of item purchased on different dates. I want to only select those items that are NOT purchased in the last …
Oracle Database Object SQL query
In Oracle Database. There are two object tables SHOPS(S_NUM, S_NAME, TEL). And PRODUCTS(P_NUM, P_NAME, P_VAL, P_PRICE, SHOP_NUM). How to write in Oracle Object SQL language query to get how much there …
Vue js how to auto select checkbox based on database value with laravel
Im new to frontend so its a bit difficult for me to tell but here is my problem. I have this schedules menu or table and in the table itself it has a violation and remarks. This seems hard to explain …