sql stringlengths 6 1.05M |
|---|
DROP SCHEMA IF EXISTS `project_management`;
CREATE SCHEMA `project_management`;
use `project_management`;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `activity`;
CREATE TABLE `activity` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`activity_name` varchar(128) NOT NULL,
`status` enum('Not Started','In Progre... |
/*
* get all values
* `GET api/values/`
*/
create function rest__get_values() returns json as
$$
begin
raise info 'rest__get_values()';
return (
select json_agg("value") from "values"
);
end
$$ language plpgsql security definer;
revoke all on function rest__get_values() from public;
grant execute o... |
DELETE FROM request_watcher;
DELETE FROM request;
ALTER TABLE request MODIFY issue_link VARCHAR(150);
CREATE UNIQUE INDEX idx_request_01
ON request (issue_link); |
<gh_stars>10-100
-- Query the list of CITY names from STATION which
-- have vowels (i.e., a, e, i, o, and u) as both their first and last characters.
-- Your result cannot contain duplicates.
--^ and $ anchor the match to the beginning and end of the value.
select DISTINCT(CITY) FROM STATION WHERE
CITY RLIKE '^[ae... |
<filename>test/sql/drop/basic-drop-trigger.sql
DROP TRIGGER IF EXISTS `happy`.`insertRecord`
|
<reponame>RonSherfey/data-act-broker-backend<filename>dataactvalidator/config/sqlrules/fabs32_detached_award_financial_assistance_1.sql<gh_stars>0
-- PeriodOfPerformanceStartDate is an optional field, but when provided, must follow YYYYMMDD format
SELECT
row_number,
period_of_performance_star,
afa_generated... |
{{ config(
pre_hook=["{{ snowplow_utils.alter_table_sql(
relation=ref('data_alter_table_sql'),
required_columns=[['model', dbt_utils.type_string()],
['id', dbt_utils.type_int()],
... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table hotel (
id bigint not null,
name varchar(255),
address varchar(255),
constraint pk_hotel primary key (id)
... |
<reponame>Mephostopilis/mall<filename>server/app/service/cms/migrations/20210102234513_cms_help.up.sql
CREATE TABLE `cms_help` (
`id` bigint(20) unsigned NOT NULL COMMENT 'id',
`app_id` bigint(20) unsigned NULL DEFAULT NULL ,
`category_id` bigint(20) DEFAULT NULL COMMENT '分类',
`icon` varchar(255) DEFAULT NULL C... |
SELECT COUNT(*) FROM USER_ROLES
WHERE DELETE_FLAG = 0;
|
<reponame>M0WA/jobcenter
CREATE OR REPLACE FUNCTION jobcenter.do_task_done(a_jobtask jobtask, a_outargs jsonb)
RETURNS void
LANGUAGE plpgsql
SET search_path TO jobcenter, pg_catalog, pg_temp
AS $function$DECLARE
v_error jsonb;
v_inargs jsonb;
v_changed boolean;
v_newvars jsonb;
BEGIN
-- check for error status
... |
<gh_stars>0
SELECT
*
FROM TABLE_A
|
-- @testpoint:opengauss关键字descriptor(非保留),作为用户名
--关键字descriptor作为用户名不带引号,创建成功
drop user if exists descriptor;
CREATE USER descriptor PASSWORD '<PASSWORD>';
drop user descriptor;
--关键字descriptor作为用户名加双引号,创建成功
drop user if exists "descriptor";
CREATE USER "descriptor" PASSWORD '<PASSWORD>';
drop user "descriptor";
-... |
/* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 12.1 */
/* Created On : 06-Sep-2018 14:36:05 */
/* DBMS : PostgreSQL */
/* ---------------------------------------------------- */
/* Drop Tables */
DROP TABLE IF EXISTS i4ldata.t_topoAreaFeatu... |
select a.sid, b.name, a.value
from v$sesstat a, v$statname b
where a.statistic# = b.statistic#
and a.value <> 0
and b.name = 'table scan blocks gotten'
order by 3,1;
|
DROP TABLE IF EXISTS Enrollment;
CREATE TABLE Enrollment(
ProjectEntryID INTEGER NOT NULL
,PersonalID INTEGER NOT NULL
,ProjectID INTEGER NOT NULL
,EntryDate DATE NOT NULL
... |
/*
Proces naplnenia events z 3 systemov.
Zavislost: Pred procesom musia byt naplnene data v star_respository, star_datum
Najprv to bezalo nad 15min ... cena v explain plan 12 286 441.
Po pridani indexu na datum.rok / mesiac / den a nazov na repozitar 786 000
Bez indexu STAR_Events__IDXv1 1,3 sec
Po pridani i... |
/*
Enter your query here.
Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error.
*/
SELECT
c.company_code,
c.founder,
count(distinct lm.lead_manager_code),
count(distinct sm.senior_manager_code),
count(distinct m.manager_code),
count(distin... |
/* First draft for inserting some shoe shop data */
use shoeshop;
/* Insert some product data */
insert into `product` (`product_ID`, `name`, `type`, `available_quantity`, `price`) values
(1111, 'sneaker_1', 'sneaker', 1, 51.61),
(1112, 'sneaker_2', 'sneaker', 2, 52.62),
(1113, 'boot_1', 'boot', 3, 53.63),
(1114, 'bo... |
INSERT INTO "Teachers" ("login", "hash", "originHash", "accessType", "name", "surname", "patronymic")
VALUES (
"test1",
"test1SecretPw",
"",
1,
"TestName1",
"TestSurname1",
"TestPatronymic1"
);
INSERT INTO "Teachers" ("login", "hash", "originHash", "accessType", "name", "surname", "pa... |
CREATE TABLE IF NOT EXISTS `%prefix%shares_object` (
`share_id` INT NOT NULL,
`code` VARCHAR(10) NOT NULL,
`item_id` INT NOT NULL,
PRIMARY KEY (`share_id`),
KEY `idx_search1` (`code`,`item_id`)
); |
CREATE TABLE notifications(
notification_id BIGINT PRIMARY KEY NOT NULL DEFAULT id_generator(),
user_id BIGINT NOT NULL,
trigger_id BIGINT NOT NULL,
type INTEGER NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now(),
CONSTRAINT fk_user
FOREIGN KEY(user_id)
REFERENCES users(u... |
CREATE TABLE article_type(
article_type_id UUID PRIMARY KEY,
name VARCHAR(50) UNIQUE NOT null
);
INSERT INTO article_type(article_type_id, name)
VALUES ('d2d8f302-cea6-4208-8e20-8af4e2832236', 'pubmed'), ('8d090aef-33e0-4c90-a9b7-a91084e9213b', 'omim'), ('72feceaf-2ed0-4744-b6d0-bbfbfc7f7a82', 'hgmd');
CREATE TAB... |
SET DEFINE OFF;
--SQL Statement which produced this data:
--
-- SELECT * FROM FIRE_ADM.SRIDNAMESPACE;
--
Insert into SRIDNAMESPACE
(OBJECTID, NAMESPACE, BESKRIVELSE)
Values
(1, 'DK', 'SDFE register over danske systemer');
Insert into SRIDNAMESPACE
(OBJECTID, NAMESPACE, BESKRIVELSE)
Values
(2, 'EPSG', 'I... |
DECLARE @idoc int
DECLARE @doc xml
SELECT @doc = c FROM OPENROWSET(BULK '/home/parallels/Desktop/doctors.xml',
SINGLE_BLOB) AS TEMP(c)
EXEC sp_xml_preparedocument @idoc OUTPUT, @doc
SELECT *
FROM OPENXML (@idoc, '/Doctors/P')
WITH (Passenger VARCHAR(85) , Sex VARCHAR(6), Age INT)
EXEC ... |
ALTER TABLE "public"."users" ADD COLUMN "multisig" text;
ALTER TABLE "public"."users" ALTER COLUMN "multisig" DROP NOT NULL;
|
<gh_stars>10-100
CREATE OR REPLACE VIEW view_osmaxx.address_p AS SELECT
osm_id,
lastchange,
geomtype,
geom,
"type",
"name",
name_en,
name_fr,
name_es,
name_de,
int_name,
label,
tags,
street,
housenumber,
postcode,
city,
country
FROM osmaxx.address_... |
<filename>spring-jdbc/src/test/resources/org/springframework/jdbc/config/db-update-data.sql<gh_stars>0
update T_TEST
set NAME='Dave'
where name = 'Keith'; |
USE RailWaySystemDB
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 12/21/2019
-- Description: GetAllSubscriptions
-- =============================================
CREATE PROCEDURE GetAllSubscriptions
-- Add the parameters for the ... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 06-Mar-2017 às 11:48
-- Versão do servidor: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
/*
Warnings:
- You are about to drop the `DriverComment` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `TruckComment` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "DriverComment" DROP CONSTRAINT "... |
<filename>PL1/insereDados.sql
/*
Fazer copy-paste deste ficheiro
para o SQL Editor do PgAdmin e executar (F5).
*/
/* Insere os departamentos
*/
INSERT INTO dep VALUES (10, 'Contabilidade', 'Condeixa');
INSERT INTO dep VALUES (20, 'Investigacao', 'Mealhada');
INSERT INTO dep VALUES (30, 'Vendas', 'Coimb... |
--1.
CREATE TABLE customers(
company_name VARCHAR(40),
id SMALLINT NOT NULL PRIMARY KEY,
contact VARCHAR(40),
email VARCHAR(40),
phone VARCHAR(20),
segment VARCHAR(40),
company_size VARCHAR(20)
);
SELECT *
FROM customers;
--2.
CREATE TABLE offices(
county_id INT NOT NULL PRIMARY KEY,
county VARCHAR(60),
st... |
USE movies
/*
SELECT m.TITLE, m.YEAR, s.NAME, s.ADDRESS FROM MOVIE m
JOIN STUDIO s ON m.PRODUCERC# = s.PRESC#
WHERE m.LENGTH > 120
*/
/*
SELECT DISTINCT m.STUDIONAME, s.STARNAME FROM MOVIE m
JOIN STARSIN s ON m.TITLE = s.MOVIETITLE AND m.YEAR = s.MOVIEYEAR
ORDER BY m.STUDIONAME
*/
/*
SELECT DISTINCT me.NAME FROM M... |
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: localhost Database: laravelcms
-- ------------------------------------------------------
-- Server version 5.7.29-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... |
/*
Comandos usados no treinamento "Descubra o SQL"
*/
-- 01_01
SELECT 'Hello, World!'
SELECT 10
SELECT primeiro_nome FROM pessoas
SELECT primeiro_nome, ultimo_nome FROM pessoas
SELECT ultimo_nome, primeiro_nome FROM pessoas
SELECT * FROM pessoas
-- 01_02
SELECT * FROM pessoas WHERE sigla_estado = 'SP';
SELECT ... |
CREATE INDEX "LA_EVENT_EVENT_TIME_IDX" ON LA_EVENT(EVENT_TIME);
|
create table ranks(
name varchar(32) not null primary key
);
create table chess_players(
id identity primary key,
first_name varchar(64) not null,
last_name varchar(64) not null,
rank_name varchar(32) not null,
foreign key (rank_name) references ranks(name)
);
create table debuts(
code varchar(8) not nu... |
<reponame>12urenloop/Telraam<filename>src/main/resources/db/migration/V7__Rename_beacon_to_station.sql
alter table beacon rename to station;
ALTER TABLE detection RENAME COLUMN beacon_id TO station_id; |
CREATE VIEW Interpretations.PlayStepDetail
AS
SELECT p.SectionKey,
ps.PlayKey,
ps.TempoNumber,
ps.Actor,
ps.FootworkKey,
ps.TechniqueKey1,
ps.TechniqueKey2,
ps.TechniqueKey3,
ps.TargetKey1,
ps.TargetKey2,
ps.TargetKey3,
ps.GuardKey,
ps... |
USE AdventureWorks2016
SELECT
schema_name(schema_id) as schema_name,
name,
object_id,
create_date,
modify_date
FROM sys.Tables
ORDER BY name |
<filename>download/inserimentoorari.sql
INSERT INTO `orario` (`idorario`, `giornosettimana`, `ora`, `attivo`) VALUES (NULL, 'lun', '8:00 - 8:15', '0');
INSERT INTO `orario` (`idorario`, `giornosettimana`, `ora`, `attivo`) VALUES (NULL, 'lun', '8:15 - 8:30', '0');
INSERT INTO `orario` (`idorario`, `giornosettimana`, `or... |
-- instant messaging
create table o_im_message (
id number(20) not null,
creationdate date,
msg_resname varchar2(50 char) not null,
msg_resid number(20) not null,
msg_anonym number default 0,
msg_from varchar2(255 char) not null,
msg_body clob,
fk_from_identity_id number(20) not null,
primary... |
create database legion default character set utf8mb4 collate utf8mb4_general_ci;
USE legion;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for act_evt_log
-- ----------------------------
DROP TABLE IF EXISTS `act_evt_log`;
CREATE TABLE `act_evt_log` (
`LOG_NR_` ... |
-- phpMyAdmin SQL Dump
-- version 3.5.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 23, 2013 at 08:00 PM
-- Server version: 5.5.29
-- PHP Version: 5.4.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `blog`
--
-- ---------------------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 26, 2016 at 04:10 PM
-- Server version: 5.5.46-0ubuntu0.14.04.2
-- PHP Version: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
INSERT INTO sequence (name, status, fk_project_id, thumbnail) VALUES ('first sequence published', 3, 1, "");
INSERT INTO sequence (name, status, fk_project_id, thumbnail) VALUES ('first sequence project 1', 1, 1, "");
INSERT INTO sequence (name, status, fk_project_id, thumbnail) VALUES ('second sequence project 1', 1, ... |
<gh_stars>1-10
CREATE TABLE `mdl_elp_progress_report` (`userid` bigint(10), `courseid` bigint(10), `intake_cohort` varchar(32), `course_group` varchar(32), `status_group` varchar(32), `date_completed` datetime, `grade` varchar(255), `course_total` decimal(65,2), `course_status` text, `final_status` varchar(89), `final_... |
<reponame>tillkuhn/kotlin-angular<gh_stars>1-10
-- Public Tour
INSERT INTO public.location (id, etype, external_id, name, summary, notes, primary_url, image_url, area_code,
coordinates, tags, auth_scope, created_at, updated_at, created_by, updated_by, version,
p... |
--
-- Licensed to ESUP-Portail under one or more contributor license
-- agreements. See the NOTICE file distributed with this work for
-- additional information regarding copyright ownership.
--
-- ESUP-Portail licenses this file to you under the Apache License,
-- Version 2.0 (the "License"); you may not use this file... |
<reponame>jmkristian/mail-server-configuration<filename>usr/share/roundcube/SQL/sqlite/2018122300.sql<gh_stars>1-10
CREATE TABLE tmp_filestore (
file_id integer PRIMARY KEY,
user_id integer NOT NULL,
filename varchar(128) NOT NULL,
mtime integer NOT NULL,
data text NOT NULL
);
INSERT INTO tmp_files... |
DROP PROCEDURE IF EXISTS `CreateUserSession`;
CREATE PROCEDURE `CreateUserSession` (_UserID VARCHAR(36), _OrgID VARCHAR(36), _SessionKey TEXT)
#BEGIN#
BEGIN
DELETE FROM UserSession WHERE UserID = _UserID;
INSERT INTO UserSession (UserID, OrgID, SessionKey)
VALUE (_UserID, _OrgID, _SessionKey);
END |
DROP TABLE "public"."table11";
|
<reponame>Zhaojia2019/cubrid-testcases<gh_stars>1-10
create table cov_t3 (id1 int, id2 varchar(30), id3 int);
insert into cov_t3 values (5,'mnpqrt',55);
insert into cov_t3 values (10,'abcd',100);
insert into cov_t3 values ( 11,'abmnp',111);
insert into cov_t3 values ( 15,'mnpde',111);
insert into cov_t3 values ( 5,'abc... |
CREATE TABLE IF NOT EXISTS ExamStatus (
id SERIAL NOT NULL PRIMARY KEY,
for_exam INTEGER NOT NULL,
from_student INTEGER NOT NULL,
status INTEGER DEFAULT 0,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 29-Out-2021 às 05:36
-- Versão do servidor: 10.4.20-MariaDB
-- versão do PHP: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
-- MariaDB dump 10.18 Distrib 10.5.8-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: laravel
-- ------------------------------------------------------
-- Server version 10.5.8-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... |
-- phpMyAdmin SQL Dump
-- version 4.2.12deb2
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Dim 05 Juillet 2015 à 18:07
-- Version du serveur : 5.6.24-0ubuntu2
-- Version de PHP : 5.6.4-4ubuntu6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
<filename>prisma/migrations/20220430030736_update_structure/migration.sql
/*
Warnings:
- You are about to drop the column `id_client` on the `delivery` table. All the data in the column will be lost.
- You are about to drop the column `id_deliveryman` on the `delivery` table. All the data in the column will be l... |
--sistemski pogled procedura
--brisanje procedura
USE TestDB
GO
SELECT SCHEMA_NAME(SCHEMA_ID) AS SchemaName,
Name AS ProcedureName
FROM sys.procedures;
GO
DROP PROCEDURE Sales.GetSalesPersionNames
GO |
<filename>src/main/plpgsql/so/glad/wechat/test_news.sql
CREATE SEQUENCE wechat.table_test_news_id_seq
INCREMENT 1 START 1 MINVALUE 1
MAXVALUE 9223372036854775807 CACHE 1;
ALTER SEQUENCE wechat.table_test_news_id_seq
OWNER TO soglad;
CREATE TABLE IF NOT EXISTS wechat.test_news
(
id BIGINT NOT NULL DE... |
<reponame>ntenczar/dibsv3
-- Your SQL goes here
ALTER TABLE queues
ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT now();
|
-- The order by ensures that the most recently observed result is at the top, and because we use
-- DISTINCT on patient_id and description_id, this means we only get the most recent of each
-- observation. Note that the view only contains rows were there is an observation; for example
-- if there has never been a recor... |
<filename>14-GROUPING SETS.sql
SELECT
nationality, -- Select nationality of the actors
gender, -- Select gender of the actors
COUNT(*) -- Count the number of actors
FROM actors
GROUP BY GROUPING SETS ((nationality), (gender), ()); -- Use the correct GROUPING SETS operation
SELECT
c.country, -- Select coun... |
<reponame>flightlog/flsserver
USE [FLSTest]
GO
PRINT 'Update SystemVersion Information'
INSERT INTO [dbo].[SystemVersion]
([VersionId]
,[MajorVersion]
,[MinorVersion]
,[BuildVersion]
,[RevisionVersion]
,[UpgradeFromVersion]
,[UpgradeDateTime])
... |
<reponame>aliostad/deep-learning-lang-detection<filename>data/train/sql/b49fccd175ff473cb996649bc7512779bf886483export.sql
--------------------------------------------------------
-- Create user
--------------------------------------------------------
create user root123 identified by password;
grant connect to root12... |
CREATE TABLE accounts
(
id uuid NOT NULL,
email varchar(100) NOT NULL,
password varchar(150) NOT NULL,
created_at timestamp WITHOUT TIME ZONE DEFAULT (NOW() AT TIME ZONE 'UTC') NOT NULL,
updated_at timestamp WITHOUT TIME ZONE NULL,
PRIMARY KEY (id),
UNIQUE (email)
);
|
create or replace package regex_arr
as
--Record type to store the array of matches into
--make a subtype of dbms_sql.varchar2a so we don't rely on parent types
--(can change the underlying type in future if need be, without breaking
--code that uses this utility)
subtype t_string_list is dbms_sql.v... |
<gh_stars>0
LOCK TABLES `persons` WRITE;
/*!40000 ALTER TABLE `persons` DISABLE KEYS */;
INSERT INTO `persons` VALUES (23,'Alec','May'),(27,'Alexis','Patterson'),(17,'Azul','Watson'),(15,'Broderick','Boyer'),(9,'Gauge','Jennings'),(19,'Helena','Prince'),(11,'Jeffrey','Wong'),(13,'Leah','Holder'),(29,'Makenzie','Lynn'),... |
alter table wallet add column IF NOT EXISTS is_irridium boolean not null default false;
insert into system_settings (key, value) values('ls_dto', 'init');
|
<gh_stars>0
CREATE TABLE [dbo].[IdentityEntityTransaction]
(
[Id] UNIQUEIDENTIFIER NOT NULL,
[SourceSystemEntityIdentityId] UNIQUEIDENTIFIER NOT NULL,
CONSTRAINT [PK_IdentityEntityTransaction] PRIMARY KEY NONCLUSTERED ([Id]),
CONSTRAINT [FK_IdentityEntityTransaction_EntityTransaction]
FOREIGN KEY ([Id])
REFERE... |
ALTER TYPE nw.fistful_cash_flow_change_type ADD VALUE 'deposit_revert'; |
<gh_stars>0
-- @testpoint:opengauss关键字optimization(非保留),作为用户名
--关键字explain作为用户名不带引号,创建成功
drop user if exists optimization;
CREATE USER optimization PASSWORD '<PASSWORD>';
drop user optimization;
--关键字explain作为用户名加双引号,创建成功
drop user if exists "optimization";
CREATE USER "optimization" PASSWORD '<PASSWORD>';
drop user... |
DELETE FROM `award_type`;
-- ----------------------------
-- Records of award_type
-- ----------------------------
INSERT INTO `award_type` VALUES ('76', '1', 'employee', 'Caregiver of the Month Award', '1', '#2a85e0');
INSERT INTO `award_type` VALUES ('77', '1', 'employee', 'Caregiver of the Month Award', '2', '#2a85... |
<reponame>t-okkn/ip-calc-practice-api<filename>ip-calc-api.sql/get-results.sql
SELECT
`id`,
`question_number`,
`source`,
`cidr_bits`,
CAST(`is_cidr` AS UNSIGNED) AS `is_cidr`,
`correct_nw`,
`answer_nw`,
`correct_bc`,
`answer_bc`,
`elapsed`,
`created`,
`updated`
FROM T_QUESTION
WHERE `id` = :id;
|
ALTER TABLE `[#DB_PREFIX#]users` CHANGE `verified` `verified` VARCHAR( 32 ) NULL DEFAULT NULL;
UPDATE `[#DB_PREFIX#]users` SET `verified` = 'personal' WHERE `verified` = '1';
UPDATE `[#DB_PREFIX#]users` SET `verified` = '' WHERE `verified` = '0';
|
{#
# CREATE DATABASE does not allow us to run any
# other sql statements along with it, so we wrote
# separate sql for rest alter sql statements here
#}
{% import 'macros/security.macros' as SECLABEL %}
{% import 'macros/variable.macros' as VARIABLE %}
{% import 'macros/privilege.macros' as PRIVILEGE %}
{% import 'macr... |
CREATE TABLE [BBS].[Thread]
(
[Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
[Title] VARCHAR(64) NOT NULL,
[Timestamp] TIMESTAMP NOT NULL,
[Creator] UNIQUEIDENTIFIER NOT NULL,
CONSTRAINT [ThreadCreator] FOREIGN KEY ([Creator]) REFERENCES [BBS].[User]([Id])
)
|
<filename>VirtualMachine/Scripts/Create Tables/PeakValuesLaunchData2018.sql
use Main
Create Table PeakValuesLaunchData2018
(
ID int IDENTITY(1,1) PRIMARY KEY,
SupplyVolts float,
PiezoXMax float,
PiezoXAvg float,
PiezoXMin float,
PiezoYMax float,
PiezoYAvg float,
PiezoYMin float,
PiezoZMax float,
PiezoZAvg float,
Pi... |
CREATE OR REPLACE FUNCTION ts.insertrelativechronology(_analysisunitid integer, _relativeageid integer, _chroncontrolid integer, _notes character varying DEFAULT NULL::character varying)
RETURNS integer
LANGUAGE sql
AS $function$
INSERT INTO ndb.relativechronology (analysisunitid, relativeageid, chroncontrolid, not... |
<gh_stars>10-100
--==============================================================
--****** C I V I L I Z A T I O N S ******
--==============================================================
--==========
-- Macedon
--==========
-- adj general bugfix
UPDATE Modifiers SET SubjectRequirementSetId=NULL WHERE ModifierI... |
<filename>db/sql/2176__alter_procedure_f_arvo_amis.sql
USE [ANTERO]
GO
/****** Object: StoredProcedure [dw].[p_lataa_f_arvo_amis] Script Date: 20.3.2019 22:11:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dw].[p_lataa_f_arvo_amis] AS
TRUNCATE TABLE dw.f_arvo_amis
INSERT INTO dw.f... |
SELECT DISTINCT Accounts.BasePath,
COUNT(DISTINCT Machines.Address) as NumMachines,
MAX(Cast ((JulianDay(datetime('{scanDateTime}')) - JulianDay(OSAccounts.LastPasswordSet)) As Integer)) as PasswordAge
FROM Accounts
LEFT OUTER JOIN OSGroupModel
ON Accounts.Id = OSGroupModel.OSAccount_id
LEFT OUTER JOIN OSAccounts... |
<filename>server/database/init.sql
/*
Navicat Premium Data Transfer
Source Server : 腾讯云轻量应用服务器
Source Server Type : MySQL
Source Server Version : 80026
Source Host : 172.16.58.3:3306
Source Schema : april
Target Server Type : MySQL
Target Server Version : 80026
File Encoding ... |
<filename>scripts/upgrades/1.0.3 to 2.0.0/db-updates/mysql-2012-01-19b.sql
--
-- Copyright 2005-2016 The Kuali Foundation
--
-- Licensed under the Educational Community 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
--... |
SELECT Name,
'Part of the day' =
CASE
WHEN DATEPART(HOUR, Start) >= 0 AND DATEPART(hour, Start) < 12 THEN 'Morning'
WHEN DATEPART(HOUR, Start) >= 12 AND DATEPART(hour, Start) < 18 THEN 'Afternoon'
ELSE 'Evening'
END,
Duration =
CASE
WHEN Duration <= 3 THEN 'Extra Short'
WHEN Duration > 3 AND Duration ... |
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64)
--
-- Host: localhost Database: npms
-- ------------------------------------------------------
-- Server version 8.0.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... |
/* -----------------------------------------------------------------------------
Delete all data from the PIMS_CLAIM table and repopulate.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Author Date Comment
------------ ----------- ---------------------------------------... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50721
Source Host : localhost:3306
Source Schema : car_rent
Target Server Type : MySQL
Target Server Version : 50721
File Encoding : 65001
Date: ... |
<reponame>kevin-at-datical/liquibase-test-harness
INVALID TEST
Liquibase does not support dropping primary key for Sqlite
-- See https://docs.liquibase.com/change-types/drop-primary-key.html
|
CREATE TABLE scm_medical_observational_study(
seq BIGINT AUTO_INCREMENT PRIMARY KEY,
/**
* type: org.kyojo.schemaorg.m3n5.core.Container$AdditionalType
* param: org.kyojo.schemaorg.m3n5.core.Clazz$URL
*/
additional_type VARCHAR(100) NULL,
/**
* type: org.kyojo.schemaorg.m3n5.core.Container$AlternateName... |
-- Verify ggircs-portal:tables/application_003 on pg
begin;
select column_name
from information_schema.columns
where table_schema='ggircs_portal' and table_name='application' and column_name='swrs_report_id';
rollback;
|
//===========================================================
// Create ec2 monitoring objects
//===========================================================
// set context
USE ROLE SNOWALERT;
USE WAREHOUSE SNOWALERT;
// CREATE TABLE
CREATE TABLE IF NOT EXISTS
SNOWALERT.AWS.EC2_MONITORING_LANDING_ZONE (
RAW_DATA ... |
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled'])) }}
select *
from {{ var('engagement') }}
|
<reponame>muntaza/catatan_openpersediaan_balangan<filename>saldo_awal_2020/dinkes/dinkes_obat_insert.sql
INSERT INTO persediaan (id_transaksi, id_barang, jumlah, harga) VALUES (101794,517,429,2000);
INSERT INTO persediaan (id_transaksi, id_barang, jumlah, harga) VALUES (101794,539,164,4600);
INSERT INTO persediaan (id_... |
<reponame>antoinecarme/caret2sql
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretRegressor_rf_pca
-- Dataset : freidman3
-- Database : firebird
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model... |
<gh_stars>10-100
alter table "public"."ContentElement" rename column "itemId" to "contentGroupId";
|
DELIMITER //
DROP PROCEDURE IF EXISTS INSERT_MAESTRO;
//
CREATE PROCEDURE INSERT_MAESTRO(IN nombreMaestro VARCHAR(45), IN apellidoMaestro VARCHAR(45), IN correoMaestro VARCHAR(45), IN cubiculoMaestro VARCHAR(45))
BEGIN
INSERT INTO Maestro (nombre_Maestro,apellido_Maestro,correo_Maestro,cubiculo_Maestro) VALUES (nomb... |
<gh_stars>0
INSERT INTO dbo.Symptom
([Code], [Name], [Overview])
VALUES
( N'Q83030', N'dementia', N''),
( N'Q86', N'headache', N''),
( N'Q12202', N'stroke', N''),
( N'Q935293', N'purpura', N''),
( N'Q170990', N'arthritis', N''),
( N'Q183425', N'abdominal pain', N''),
( N'Q1363741', N'erythroderma', N''),
( N'Q2142191',... |
<reponame>mrfkelly46/link-shortener
DELIMITER //
DROP PROCEDURE IF EXISTS reverseLink //
CREATE PROCEDURE reverseLink(IN shortened varchar(64))
BEGIN
SELECT original_link FROM links WHERE shortened_link=shortened;
END //
DELIMITER ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.