Skip to content

Instantly share code, notes, and snippets.

View somratcste's full-sized avatar

G.M.Nazmul Hossain (Somrat). somratcste

View GitHub Profile
select pfo.id as order_id, oli.id, oli.qty as required_qty, count(assigned_si.id) as assigned_qty, sum(olivs.confirmed_qty) as confirmed_qty
from (
select *
from orders
where status = 5
) as pfo
inner join order_line_items as oli on pfo.id = oli.order_id
left join (
select *
from stock_items
@somratcste
somratcste / startup.sh
Last active April 1, 2018 08:54 — forked from Shipu/startup.sh
Ubuntu Startup (Test on 17.10)
# nginx
# php 7.1 & php 5.6
# mysql 5.7
# node js v9
# docker ( ce )
# composer
# laravel installer
# tld resolver
# oh-my-zsh
# sublime text 3
<?php
fscanf(STDIN, "%d %d", $number, $time);
for ($i = 1; $i <= $time; $i++) {
$lastDigit = $number % 10 ;
if($lastDigit != 0) {
$number -= 1;
} else {
$number /= 10;
@somratcste
somratcste / ToDo Application
Created August 26, 2023 11:08
Create a ToDo Application Using SpringBoot
We would like you to create a ToDo REST-Service Application.
Technology: Java, SpringBoot, SpringMVC, Hibernate, JPA, H2 Database
Todo
{
id [mandatory]
name [mandatory]
description
tasks: [
{