答案 0 :(得分:1)
假设我正确理解你的问题,根据你的样本数据,你的预期结果应该是16,假设是这样,这是使用select ne,
max(case when type = 'port-shelf' then 16 * provisioned else 0 end) -
max(case when type = 'summary' then provisioned else 0 end) -
max(case when type = 'rcmm' then provisioned else 0 end) as free_slot,
insert_date
from yourtable
group by ne, insert_date
的一个选项:
package sola5;
import java.util.Scanner;
public class Assign1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter a three digit integer: ");
int a = input.nextInt();
System.out.print("Now, enter a 2 digit integer: ");
int b = input.nextInt();
while (a > b) {
a = a-b;
System.out.println();
}
}
}