sql stringlengths 6 1.05M |
|---|
<reponame>Nilesh7347/task<filename>exam.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: Dec 17, 2021 at 02:58 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTIO... |
UPDATE character_quests SET name='Q00161_FruitOfTheMotherTree' WHERE name='161_FruitsOfMothertree';
UPDATE character_quests SET name='Q00176_StepsForHonor' WHERE name='176_StepsForHonor';
UPDATE character_quests SET name='Q00277_GatekeepersOffering' WHERE name='277_GatekeepersOffering';
UPDATE character_quests SET name... |
<reponame>guherbozdogan2/yelp_challenge<filename>data/db/migration/business.cql
CREATE TABLE IF NOT EXISTS test.business
(
address text,
attributes_map MAP<text, text>,
business_id text,
categories LIST<text>,
city text,
hours_map MAP<text, text>,
is_open boolean,
latitude float,
longitude float,
nam... |
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema pr... |
--The 3 queries below represent the percent difference in rent when comparing rents from 2014 to 2009, across the median, upper and lower brackets.
--The yoy_pct_diff column in each of the queries below is the year over year difference in rent. At this point we are not planning on using column.
--The diff column is th... |
<filename>ORACLE_SQL/SHARED_FUNCTIONS/14_ORG/14F001_get_site_desc.sql
/* Formatted on 12-20-2018 9:25:52 AM (QP5 v5.126.903.23003) */
CREATE OR REPLACE FUNCTION ORG.GET_SITE_DESC (P_SITEID INTEGER)
RETURN VARCHAR2
AS
L_RESULT VARCHAR2 (200 BYTE);
BEGIN
L_RESULT := '';
SELECT SITE_DESC
INTO L_RES... |
<filename>@api/db/migrations/committed/000209.sql
--! Previous: sha1:546e98977050fdf62a028a4bef8053532694f0b6
--! Hash: sha1:ce38805da6df5e81c976a70bbe355e19619a5d7a
--! split: 1-current.sql
-- Enter migration here
create type app_private.role as enum (
'user',
'moderator',
'admin');
alter table app_private.use... |
<reponame>silvia-taliana/employee-tracker
DROP DATABASE IF EXISTS employees_db;
CREATE DATABASE employees_db;
USE employees_db;
CREATE TABLE department (
id INT NOT NULL,
name VARCHAR(30) NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL,
title VARCHAR(30) NULL,
salary DECIMAL NULL,
department_id INT NUL... |
<reponame>Ed-Fi-Alliance-OSS/Ed-Fi-MigrationUtility
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.... |
<gh_stars>0
INSERT INTO onecmdb.t_attribute VALUES (-9217384312469240723, -5591169885085062245, 'Target', 'target', true, false, 'The target of this reference', 'oneCMDB:#8189059067813029546', null, 'oneCMDB:#-505646845337106548', null, null, 673292606483933488, 1, 1, '2016-12-28 16:01:52', '2016-12-28 16:01:52');
INS... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 25, 2018 at 01:52 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "-03:00";
/*!4... |
<filename>tpcds-multi-engine/spark-prepared/q1.sql<gh_stars>0
WITH customer_total_return AS
( SELECT
sr_customer_sk AS ctr_customer_sk,
sr_store_sk AS ctr_store_sk,
sum(sr_return_amt) AS ctr_total_return
FROM ${database}.store_returns, ${database}.date_dim
WHERE sr_returned_date_sk = d_date_sk AND d_yea... |
CREATE TABLE `engine_local_logic_file_version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`logic_id` int(11) DEFAULT NULL,
`version` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
alter table audit_event
add column error_code varchar(255);
|
--NetVision data extract for DIRBS
--Reuse CRC data to generate dummy operator input dump for DIRBS
--This version takes all the 5 months data for one operator = currently written as Tigo, mapping to ufone
--Note due to subtle differences in the datasets, can't just replace the table names with other Colombian operator... |
RESTORE DATABASE testdata FROM DISK = "/var/opt/mssql/backup/avstemning_sap_data.bak" WITH
MOVE "avstemning_sap_data" to "/var/opt/mssql/data/avstemning_sap_data.mdf",
MOVE "avstemning_sap_data_Log" to "/var/opt/mssql/data/avstemning_sap_data.ldf",
NOUNLOAD, STATS = 10 |
CREATE SCHEMA `bank` ; |
-- We carry out operations on a temporary table this is to prevent the
-- transaction acquiring an exclusive lock on the existing table. See
-- https://github.com/ebmdatalab/openprescribing/issues/547 for
-- discussion.
SET temp_buffers = '500MB'; -- enough for dmd_product to fit into RAM
drop table if exists dmd_prod... |
<gh_stars>0
SELECT
`tc`.`job_during_journey` AS `job_name`
FROM
`journeys` AS `j`
JOIN
`travel_cards` AS `tc` ON `j`.`id` = `tc`.`journey_id`
ORDER BY DATEDIFF(`j`.`journey_end`, `j`.`journey_start`) DESC
LIMIT 1; |
CREATE TABLE [Departments](
[Id] INT PRIMARY KEY IDENTITY NOT NULL,
[Name] VARCHAR(50) NOT NULL
)
CREATE TABLE [Status] (
[Id] INT PRIMARY KEY IDENTITY NOT NULL,
[Label] VARCHAR(30) NOT NULL
)
CREATE TABLE [Users] (
[Id] INT P... |
<filename>oauth2-server/src/main/resources/db/migration/V0.7__add_oauth2.sql
-- 官方参考链接
-- https://github.com/spring-projects/spring-security-oauth/blob/master/spring-security-oauth2/src/test/resources/schema.sql
CREATE TABLE `oauth_client_details` (
`client_id` varchar(128) NOT NULL COMMENT '主键,客户端ID',
`resource_i... |
<reponame>extra-curricular-schooling/WebAPI-Demo
CREATE PROCEDURE [dbo].[SweepStakeEntry_Delete]
@SweepstakesID [int],
@UserName [nvarchar](20)
AS
BEGIN
DELETE [dbo].[SweepStakeEntry]
WHERE (([SweepstakesID] = @SweepstakesID) AND ([UserName] = @UserName))
END |
<reponame>Binny29/bluegreytechci
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 20, 2019 at 06:44 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 22 Des 2016 pada 11.21
-- Versi Server: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
CREATE TABLE IF NOT EXISTS `panels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pageID` int(11) NOT NULL,
`revision` int(11) NOT NULL,
`rowPos` int(11) NOT NULL,
`columnPos` int(11) NOT NULL,
`subject` longtext NOT NULL,
`type` varchar(255) NOT NULL,
`classes` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`... |
SELECT post_id FROM $wpdb->postmeta WHERE meta_key=%s AND meta_value=%s
|
<filename>src/main/resources/db/postgresql/V1_37__ALTER_SEARCH_FIELD_TABLE.sql<gh_stars>1-10
ALTER TABLE search_field
RENAME COLUMN parent_system_name TO profile_name;
ALTER TABLE search_field
DROP CONSTRAINT fk_search_field_system_name;
|
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/grant/e5f5572e.sql
-- file:publication.sql ln:99 expect:true
GRANT CREATE ON DATABASE regression TO regress_publication_user2
|
<reponame>COEJKnight/one
-- AwardingOfficeCode must be six characters long.
SELECT
row_number,
awarding_office_code
FROM detached_award_financial_assistance
WHERE submission_id = {0}
AND COALESCE(awarding_office_code, '') <> ''
AND LENGTH(awarding_office_code) <> 6;
|
DECLARE @sqr int,
@i int,
@door int;
SELECT @sqr =1,
@i = 3,
@door = 1;
WHILE(@door <=100)
BEGIN
IF(@door = @sqr)
BEGIN
PRINT 'Door ' + RTRIM(CAST(@door as char)) + ' is open.';
SET @sqr= @sqr+@i;
SET @i=@i+2;
END
ELSE
BEGIN
PRINT 'Door ' + RTRIM(CONVERT(char,@door)) + ' is closed.';
END
SE... |
<filename>packages/intranet-expenses/sql/common/intranet-expenses-common.sql
-- /packages/intranet-expenses/sql/common/intranet-expenses-create.sql
--
-- ]project-open[ Expenses
-- 060419 <EMAIL>
--
-- Copyright (C) 2004 - 2009 ]project-open[
--
-- All rights including reserved. To inquire license terms please
-- refe... |
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: sicei
-- ------------------------------------------------------
-- Server version 5.7.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... |
/*
Navicat MySQL Data Transfer
Source Server : 本地数据
Source Server Version : 50553
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-07-15 18:13:23
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... |
-- // CB-15466 cleanup operation indexes
-- Migration SQL that makes the change goes here.
ALTER TABLE operation DROP CONSTRAINT IF EXISTS syncoperation_operationid_key;
DROP INDEX IF EXISTS syncoperation_operationid_key;
DROP INDEX IF EXISTS syncoperation_id_idx;
DROP INDEX IF EXISTS syncoperation_operationid_idx;... |
<filename>app/server/src/main/resources/db/migration/V1_0_0__baseline.sql
create table realm (
realm_id character varying(255),
realm_name character varying(255),
enabled boolean not null default true,
sync_at timestamp with time zone,
primary key (realm_id),
unique (realm_name)
);
create table account (
... |
/**
* Inserts "Favorite Number" customer attribute
*/
INSERT INTO `eav_attribute` (`entity_type_id`, `attribute_code`, `attribute_model`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, `frontend_input`, `frontend_label`, `frontend_class`, `source_model`, `is_required`, `is_user_defined`, `default... |
<gh_stars>1-10
CREATE DATABASE dex_db;
CREATE USER dex WITH PASSWORD '<PASSWORD>';
GRANT ALL PRIVILEGES ON DATABASE dex_db TO dex;
|
--
-- Name: metrics_template; Type: TABLE; Schema: admin; Owner: pgwatch2
--
CREATE TABLE admin.metrics_template (
"time" timestamp with time zone DEFAULT now() NOT NULL,
dbname text NOT NULL,
data jsonb NOT NULL,
tag_data jsonb,
CONSTRAINT metrics_template_check CHECK (false)
);
ALT... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretRegressor_nnet
-- Dataset : boston
-- Database : teradata
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH "IL" AS
(SELEC... |
<filename>src/main/resources/db/migration/V17__legg-til-navn-kolonne.sql
alter table kontaktskjema add navn varchar(255); |
<reponame>robertlluberes/clasificador-presupuestario-2014
CREATE TABLE [dbo].[Monedas]
(
[MonedaID] tinyint PRIMARY KEY IDENTITY(1, 1),
[CodigoMoneda] tinyint NOT NULL,
[SiglaMoneda] varchar(3) NOT NULL,
[CodigoAlfabetico] varchar(3) NOT NULL,
[Descripcion] varchar(64) NOT NULL
CONSTRAINT UQ_Mone... |
<filename>src/test/resources/oracle.sql
-- Create table
create table EMP
(
empno NUMBER(4) not null,
ename VARCHAR2(10),
job VARCHAR2(9),
mgr NUMBER(4),
hiredate DATE,
sal NUMBER(7,2),
comm NUMBER(7,2),
deptno NUMBER(2)
)
tablespace USERS
pctfree 10
initrans ... |
<reponame>batoolmalkawii/city_explorer_api
DROP TABLE IF EXISTS location;
CREATE TABLE location(
id SERIAL PRIMARY KEY,
search_query VARCHAR(50),
formatted_query VARCHAR(200),
latitude VARCHAR(200),
longitude VARCHAR(200)
); |
<filename>mug.sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 25 Apr 2018 pada 19.13
-- Versi Server: 10.1.16-MariaDB
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>getwasim/egov-smartcity-suites-test
--new column to map demand reason master
alter table eg_demand_reason_details add column id_demand_reason_master bigint;
alter table eg_demand_reason_details add constraint fk_eg_dem_reason_master_id foreign key (id_demand_reason_master) references eg_demand_reason_master... |
<filename>leetcode/database/employees-earning-more-than-their-managers/select.sql
SELECT emp.Name
FROM
Employee as emp
JOIN Employee as man
ON emp.ManagerId = man.Id
WHERE emp.Salary > man.Salary
|
CREATE USER IF NOT EXISTS 'amamonitor'@'localhost' identified by 'amamonitor';
CREATE USER IF NOT EXISTS 'amamonitor'@'%' identified by 'amamonitor';
CREATE DATABASE IF NOT EXISTS amamonitor DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_bin;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK... |
CREATE TABLE Users(
userId TEXT PRIMARY KEY,
username TEXT UNIQUE,
salt TEXT,
password TEXT
);
CREATE TABLE Admins(
userId TEXT PRIMARY KEY,
canReview TEXT,
canMakeAdmin TEXT,
FOREIGN KEY(userId) REFERENCES Users(userId)
);
CREATE TABLE Templates(
templateId TEXT PRIMARY KEY,
userId TEXT,
filetype TEXT,
... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.5
-- Dumped by pg_dump version 9.6.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min... |
<reponame>JudyMotha/drop-it-like-its-shop
DROP DATABASE IF EXISTS grocerylist_db;
CREATE DATABASE grocerylist_db; |
SELECT DISTINCT first_name,last_name FROM psdb.employees; |
CREATE TABLE public.aaduser
(
object_id character(255) NOT NULL,
CONSTRAINT user_pkey PRIMARY KEY (object_id),
given_name character(255) NOT NULL,
surname character(255) NOT NULL,
user_principal_name character(255) NOT NULL,
mail_nickname character(255) NOT N... |
-- Table: "SOURCE"
-- DROP TABLE "SOURCE";
CREATE TABLE "SOURCE"
(
con_id integer NOT NULL, -- Eindeutiger Technischer Primaerschluessel
wod_id integer NOT NULL, -- Eindeutiger Technischer Primaerschluessel
CONSTRAINT pk_vorkommen PRIMARY KEY (con_id, wod_id),
CONSTRAINT fk_vorkomme_vorkommen_contine... |
update reserva
set
id_cliente = :idCliente,
id_cancha = :idCancha,
fecha = :fecha,
hora_inicial = :horaInicial,
hora_final = :horaFinal,
estado = :estado,
descuento = :descuento,
valor_de_pago = :valorDePago,
fecha_creacion = :fechaCreacion
where id = :id
; |
--liquibase formatted sql
--changeset postgres:create-schema
create table b (
id integer not null primary key,
name varchar(20)
);
--changeset postgres:insert_data
insert into b values (
12, 'myname'
);
|
TRUNCATE TABLE optum_panther_native_test._version;
TRUNCATE TABLE optum_panther_native_test.care_area;
TRUNCATE TABLE optum_panther_native_test.cost_factor;
TRUNCATE TABLE optum_panther_native_test.diagnosis;
TRUNCATE TABLE optum_panther_native_test.encounter;
TRUNCATE TABLE optum_panther_native_test.encounter_provider... |
/*
create_trans_series_table.sql is a MySQL script intended to
create a table of transliterated series names
Version: $Revision: 15 $
Date: $Date: 2019-03-05 16:32:38 -0400 (Tue, 31 Oct 2017) $
(C) COPYRIGHT 2019 Ahasuerus
ALL RIGHTS RESERVED
The copyright notice above does not ev... |
<reponame>prashantp22/employee-tracker
DROP TABLE IF EXISTS employee;
DROP TABLE IF EXISTS role;
DROP TABLE IF EXISTS department;
CREATE TABLE department(
id INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL
);
CREATE TABLE role(
id INTEGER AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(45) NOT NULL,
salar... |
DROP DATABASE IF EXISTS concert_db;
CREATE DATABASE concert_db;
-- USE concert_db;
-- CREATE TABLE users
-- (
-- user_id INT NOT NULL AUTO_INCREMENT,
-- user_name VARCHAR(50),
-- email VARCHAR(50) NOT NULL,
-- password VARCHAR(30) NOT NULL,
-- profile_picture_url VARCHAR(300),
-- PRIMARY KEY('u... |
<filename>schema.sql<gh_stars>0
DROP DATABASE IF EXISTS employee_db;
CREATE database employee_db;
USE employee_db;
CREATE TABLE department (
id int NOT NULL AUTO_INCREMENT,
department_name VARCHAR(30),
PRIMARY KEY(id)
);
CREATE TABLE role (
id int NOT NULL AUTO_INCREMENT,
title VARCHAR(30),
... |
<gh_stars>0
-- https://ola.hallengren.com/sql-server-backup.html
EXECUTE dbo.IndexOptimize
/* Update Stats */
@Databases = 'ALL_DATABASES',
@FragmentationLow = NULL,
@FragmentationMedium = NULL,
@FragmentationHigh = NULL,
@UpdateStatistics = 'ALL',
@OnlyModifiedStatistics = 'Y';
DECLARE @_dbNames VARCHAR(MAX);
/*... |
CREATE PROCEDURE [dbo].[dnn_GetTabsByModuleID]
@ModuleID Int -- NOT Null
AS
BEGIN
SELECT * FROM dbo.[dnn_vw_Tabs] T
WHERE IsDeleted = 0
AND TabID IN (SELECT TabID FROM dbo.[dnn_TabModules]
WHERE ModuleID = @ModuleID AND IsDeleted = 0)
ORDER BY PortalId, Level, ParentID, TabOrder -- PortalId added for query... |
-- --------------------------------------------------------
-- 主机: 127.0.0.1
-- 服务器版本: 5.7.11 - MySQL Community Server (GPL)
-- 服务器操作系统: Win64
-- HeidiSQL 版本: 9.3.0.4984
-- --------------------------------------------------------
/*... |
<reponame>nwalters512/attendance<gh_stars>1-10
INSERT INTO public.user_assists_course_instance (id, email, ci_term, ci_name, ci_year) VALUES (5, '<EMAIL>', 'Fall ', 'CS 225', 2018);
INSERT INTO public.user_assists_course_instance (id, email, ci_term, ci_name, ci_year) VALUES (3, '<EMAIL>', 'Fall ', 'CS 225', 2018);
I... |
-- 管理员表
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(4) NOT NULL auto_increment,
-- `Adm` int(1) NOT NULL default 0,
`Manager` varchar(30) NOT NULL default '',
`Password` varchar(20) NOT NULL default '',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
INSERT INTO `... |
<reponame>SchrodingerZhu/blog-system
-- Your SQL goes here
CREATE TRIGGER tsvector_update
BEFORE INSERT OR UPDATE
ON posts
FOR EACH ROW
EXECUTE PROCEDURE
tsvector_update_trigger(text_searchable, 'pg_catalog.english', title, content);
DROP TRIGGER tsvectorupdateproducts ON posts; |
-- Insert dim location table
INSERT INTO
dim.location (
location_id,
country,
state,
county,
population,
combined_key
)
SELECT
location_id,
country,
state,
county,
CAST(population AS INT) population,
combined_key
FROM
-- check combined key because we create our own location_id'... |
<filename>DesktopDevelopment/SQL/SqlBasics/Base.sql
CREATE TABLE Fatura(
IdP integer,
parcela integer,
DTVencimento date not null,
DTPagamento date,
Valor numeric(14,2) check (valor > 0),
constraint FK_IdPFatura foreign key (IdP) references Passagem(IdP) on delete no action on update cascade,
primary key(IdP, pa... |
<gh_stars>1000+
ALTER TYPE child_execution_info ADD parent_close_policy int; |
<gh_stars>0
Create table Titles (
title_id VARCHAR PRIMARY KEY,
title VARCHAR
);
Create table Employees (
emp_no INT PRIMARY KEY,
emp_title_ID VARCHAR,
FOREIGN KEY (emp_title_id) REFERENCES Titles(title_id),
birthdate DATE,
first_name VARCHAR,
last_name VARCHAR,
sex VARCHAR,
hire_date DATE
);
C... |
SELECT a.company, a.num, a.stop, b.stop
FROM route a JOIN route b ON
(a.company=b.company AND a.num=b.num)
WHERE a.stop=53 AND b.stop=149
|
<reponame>LeeBaekHaeng/god.com390<gh_stars>0
SELECT
A.*
FROM com.COMTNAUTHORINFO A /* 권한정보 */
;
|
<reponame>hessjc/participant-management
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table configurations (
configuration_id bigint auto_increment not null,
page_title varchar(255),
page_header v... |
<reponame>Brayan-Oviedo/Pool
select identificacion, fecha_nacimiento
from cliente
where identificacion = :identificacion |
CREATE INDEX secrets_current_idx ON secrets (current); |
## 查找学生待加入班级数据
#macro($zyFindClazzRequest(classId,studentId))
SELECT t.* FROM clazz_join_request t WHERE t.student_id = :studentId AND t.homework_class_id = :classId AND t.request_status = 0 AND t.delete_status = 0
#end
## 申请的数量
#macro($zyRequestCount(teacherId,startTime))
select count(id) from clazz_join_request wh... |
select wait_class as wait_class, sum(time_waited_micro) as time_waited_micros
from {{ v$system_event }} where wait_class <> 'Idle' group by wait_class
union all
select 'CPU', sum(value) from {{ v$sys_time_model }} where stat_name in ('DB CPU', 'background cpu time')
|
select avg(l_partkey) as total_avg from lineitem; |
<gh_stars>1000+
-- Copyright 2020 The Nomulus Authors. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unle... |
begin;
REINDEX INDEX abort_create_needed_cr_ao_reindex_gist_idx1;
drop index abort_create_needed_cr_ao_reindex_gist_idx1;
commit;
|
<reponame>joyfinder/HackerRank-solutions
/*
Enter your query here.
*/
SELECT CITY, length(CITY)
FROM STATION order by length(CITY),
city limit 1;
SELECT CITY, length(CITY)
FROM STATION order by length(CITY) desc,
city limit 1; |
<gh_stars>0
/****** Object: StoredProcedure [dbo].[app_ProgramGamePointConversion_Insert] Script Date: 01/05/2015 14:43:25 ******/
--Create the Insert Proc
CREATE PROCEDURE [dbo].[app_ProgramGamePointConversion_Insert] (
@PGID INT,
@ActivityTypeId INT,
@ActivityCount INT,
@PointCount INT,
@LastModDate DATETI... |
# Create Table
CREATE DATABASE `yt_reader` DEFAULT CHARACTER SET 'utf8mb4' default collate 'utf8mb4_general_ci';
# Create User
CREATE USER 'reader'@'%' IDENTIFIED BY 'HCWzEr<PASSWORD>VnJUV';
GRANT ALL ON yt_reader.* TO 'reader'@'%' IDENTIFIED BY 'HCWzEr4X9F@2VnJUV' WITH GRANT OPTION ;
FLUSH PRIVILEGES ; |
<filename>extra/src/test/java/tk/mybatis/mapper/additional/update/force/CreateDB.sql
drop table country_int if exists;
create table country_int
(
id integer NOT NULL PRIMARY KEY,
countryname varchar(32),
countrycode integer
);
INSERT INTO country_int (id, countryname, countrycode)
VALUES (174, '... |
CREATE TABLE IF NOT EXISTS types (
`list_english` VARCHAR(8) CHARACTER SET utf8,
`list_chinese` VARCHAR(2) CHARACTER SET utf8,
`list_japanese` VARCHAR(5) CHARACTER SET utf8
);
INSERT INTO types VALUES
('Normal','一般','ノーマル'),
('Fighting','格斗','かくとう'),
('Flying','飞行','ひこう'),
('Poison','毒','どく'... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 12, 2020 at 02:57 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.3.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>adamxtokyo/hackerrank
/*
* Practice > SQL > Basic Join > The Report
* https://www.hackerrank.com/challenges/the-report/problem
*/
SELECT IF(g.Grade >= 8, s.Name, 'NULL'), g.Grade, s.Marks
FROM Students s
INNER JOIN Grades g ON s.Marks BETWEEN g.Min_Mark AND g.Max_Mark
ORDER BY g.Grade DESC, s.Name ASC, s... |
CREATE DATABASE BRASILEIRAO GO
USE BRASILEIRAO
SELECT * FROM CAMPEONATO
--------------------------------------------------------------------
/*Consulta de clubes participantes*/
SELECT distinct [Clube 1]FROM CAMPEONATO go
--------------------------------------------------------------------
/*5 Clubes que mais ... |
<reponame>raresraf/rafMetrics
# Auto-generated init SQL file.
# Do not manually edit this file.
CREATE DATABASE IF NOT EXISTS WebMonitoring;
use WebMonitoring;
CREATE table USERS (
Userid int NOT NULL AUTO_INCREMENT,
LastName varchar(255) NOT NULL,
FirstName varchar(255) NOT NULL,
Username varchar(... |
<filename>prisma/migrations/20211103220308_retirada_de_tabelas_desnecessarias_e_alocando_active_direto_no_user/migration.sql<gh_stars>1-10
/*
Warnings:
- You are about to drop the column `active` on the `Adm` table. All the data in the column will be lost.
- You are about to drop the column `active` on the `Doct... |
<filename>data/ca/postgres/subdivisions_CH.postgres.sql<gh_stars>10-100
CREATE TABLE subdivision_CH (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_CH" ("id", "name", "level") VALUES (E'CH-AG', E'Argòvia', E'canton');
INSERT INTO "subdivision_CH" ("id"... |
<filename>test_and_ground/asist/prc/template/template_fm_clearallpages.prc
PROC $sc_$cpu_fm_clearallpages
;*******************************************************************************
; Proc Name: FM_ClearAllPages
; Test Level: none
;
; Proc Description
; The purpose of this procedure is clear all of t... |
<reponame>ministryofjustice/prison-api
INSERT INTO OFFENDER_SENTENCE_ADJUSTS (OFFENDER_SENTENCE_ADJUST_ID, SENTENCE_ADJUST_CODE, ADJUST_DATE, ADJUST_DAYS, ADJUST_STATUS, OFFENDER_BOOK_ID, SENTENCE_SEQ, ACTIVE_FLAG, COMMENT_TEXT) VALUES (-7, 'RSR', TO_DATE('2017-09-01', 'YYYY-MM-DD'), 4, null, -1, 1, 'Y', 'Some Comment ... |
<reponame>MarcoDoes/CDSPOrgs
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 13, 2021 at 06:07 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
create table foo(a int primary key, b int, c int);
insert into foo values (generate_series(1,10000), generate_series(1,10000), generate_series(1,10000));
create index concurrently on foo(b);
create index concurrently on foo(c);
vacuum full foo;
\d foo
vacuum full foo;
\d foo
vacuum full foo;
\d foo
vacuum full foo;
\d ... |
<filename>seeds.sql
USE emp_trackerDB;
INSERT INTO department (name) VALUES ("Marketing");
INSERT INTO department (name) VALUES ("Engineering");
INSERT INTO roles (title, department_id) VALUES ("Manager", 1);
INSERT INTO roles (title, department_id) VALUES ("Manager", 2);
INSERT INTO roles (title, department_id) VALU... |
<reponame>aslanvaroqua/playing-with-play
# Messages schema
# --- !Ups
CREATE TABLE (
id SERIAL PRIMARY KEY,
user_id INTEGER,
weight INTEGER,
height INTEGER,
age INTEGER,
hairColor varchar(255)
);
INSERT INTO Bodies (body) Values(1,150,170,23,"Blonde");
INSERT INTO Bodies (body) Values(2,150,... |
--Adicionando Alunos a tabela ALUNOS--
INSERT INTO ALUNO(IDUSUARIO,NOME,EMAIL,CELULAR,RA)
VALUES(1,'<NAME>','<EMAIL>','9234131243','1501375');
INSERT INTO ALUNO(IDUSUARIO,NOME,EMAIL,CELULAR,RA)
VALUES(2,'<NAME>','<EMAIL>','912344321','1602440');
INSERT INTO ALUNO(IDUSUARIO,NOME,EMAIL,CELULAR,RA)
VAL... |
-- Register the initial streams and tables from the Kafka topics
CREATE STREAM PAYMENTS (
PAYMENT_ID INTEGER KEY,
CUSTID INTEGER,
ACCOUNTID INTEGER,
AMOUNT INTEGER,
BANK VARCHAR
) WITH (
kafka_topic='payments',
value_format='json',
PARTITIONS=6
);
create stream aml_status (
PAYMENT_ID INTEGER,
BANK... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2021-01-19 16:43:36
-- 服务器版本: 5.5.62-log
-- PHP 版本: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.