sql stringlengths 6 1.05M |
|---|
DROP DATABASE IF EXISTS websoft;
CREATE DATABASE websoft;
USE websoft;
DROP TABLE IF EXISTS tech;
CREATE TABLE tech (
id int NOT NULL AUTO_INCREMENT,
label CHAR(10),
type VARCHAR(50),
PRIMARY KEY (id)
);
INSERT INTO tech (label, type) VALUES
('Apache', 'Web server'),
('PHP', 'Server side lang... |
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MySQL
Source Server Version : 80016
Source Host :
Source Schema : boot-admin
Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 65001
Date: 09/09/2020 17:39:26
*/
SET NAMES u... |
<filename>zhou.qiwen/data/products.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 16, 2020 at 11:53 AM
-- Server version: 5.6.49-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRAN... |
<filename>server/db/05112019_AlterBudget.sql
ALTER TABLE `budget` ADD `other_income` TEXT NULL AFTER `other_expenditure`;
ALTER TABLE `budget` CHANGE `other_expenditure` `other_expenditure` TEXT NULL DEFAULT NULL; |
<gh_stars>1-10
CREATE OR REPLACE LANGUAGE plpgsql;
-- separator --
CREATE SCHEMA IF NOT EXISTS __londu_1;
DROP TABLE IF EXISTS __londu_1.events ;
-- separator --
-- create events table
CREATE TABLE __londu_1.events (
id BIGSERIAL PRIMARY KEY ,
tick BIGINT, -- tick id
tid BIGINT, -- transaction id
s TEXT NOT... |
--
-- CzechIdM 7.0 Flyway script
-- BCV solutions s.r.o.
--
-- Remove columns keept wf definitions on role and add new boolean column for approve remove WF
ALTER TABLE idm_role DROP COLUMN approve_remove_workflow;
ALTER TABLE idm_role DROP COLUMN approve_add_workflow;
ALTER TABLE idm_role ADD COLUMN approve_remove bo... |
begin;
select plan(9);
SELECT view_owner_is(
'api', 'grade_snapshots', 'api',
'api.grade_snapshots view should be owned by the api role'
);
SELECT table_privs_are(
'api', 'grade_snapshots', 'student', ARRAY['SELECT'],
'student should only be granted SELECT on view "api.grade_snapshots"'
);
SELECT tab... |
<reponame>johnclary/travis-county-courts-db
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table cases add column jurisdiction_county text;
-- alter table cases add column jurisdiction_state text;
-- alter table cases add column case_category text;... |
-- Loader. Copyright (c) Astun Technology Ltd. (http://astuntechnology.com).
-- Licensed under [MIT License](https://git.io/fAxH0).
-- Drops any existing OSMM ITN tables and creates fresh tables ready to receive data
-- NOTE: The roadnodeinformation, roadlinkinformation and roadrouteinformation
-- tables all define a... |
-- name: CreateAccount :one
INSERT INTO accounts (
name,
user_id,
tink_id
) VALUES (
$1,
$2,
$3
) RETURNING *;
-- name: GetAccountByID :one
SELECT
*
FROM
accounts
WHERE
id = $1;
-- name: GetAccountsByIDs :many
SELECT
*
FROM
accounts
WHERE
id = ANY(@ids::uuid[]);
-- name: GetAccounts :many
SELECT... |
CREATE SEQUENCE [Sequences].[StateProvinceID]
AS INT
START WITH 54
INCREMENT BY 1;
|
<gh_stars>0
-- filmgenrestring table used in cinefiles denorm
-- might be a substitute for filmgenres table/view as well
-- CRH 2/22/2014
-- drop table cinefiles_denorm.filmgenrestring
create table cinefiles_denorm.filmgenrestring as
SELECT
wc.shortidentifier filmId,
cinefiles_denorm.findfilmgenres(wc.shortide... |
<reponame>gouthammasulu/sales-order-system<filename>online-application/src/main/resources/scripts/hsql/create.sql
create table address (address_id integer generated by default as identity (start with 1), city varchar(15) not null, country varchar(20) not null, house_flat_no integer not null check (house_flat_no>=1), po... |
<reponame>Kiandr/sql<filename>Db/DataCamp/Except.sql<gh_stars>0
-- names and capitals that are not in common
SELECT name
FROM cities
except
SELECT capital
FROM countries
order by name;
select capital
from countries
except
select name
from cities
order by capital |
-- system_patches
INSERT INTO `system_patches` (`issue`, `created`) VALUES ('POCOR-4081', NOW());
ALTER TABLE `deleted_records`
RENAME TO `z_4081_deleted_records`;
CREATE TABLE `deleted_records` (
`id` bigint(20) unsigned NOT NULL,
`reference_table` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`reference_ke... |
ALTER TABLE space
ADD today_view_is_public bit DEFAULT false |
<filename>installation/RampDemoSetup/createRampDemoLocks.sql
--
-- RAMP: Record and Activity Management Program
-- SMART: Software for Managing Academic Records and Transcripts
--
-- Create pre-defined Ramp/Smart tables to manage record locking.
-- You must run MySQL as root (or some other user that has permission
-- ... |
<gh_stars>0
bool
IsForeignScanParallelSafe(PlannerInfo *root, RelOptInfo *rel,
RangeTblEntry *rte);
|
-- [er]retrieve by function of to_date using defult format_argument to suit the string whith not is the format 'MM/DD/YYYY'
create class func_04 ( a string, b char(10), c varchar(10), d int);
insert into func_04 values ( null, null, null ,null);
insert into func_04 values ( '19870101', '19870101', '19870101', 1);
ins... |
<gh_stars>0
use airbnb_database;
-- --------------------------------------------------------------------------------------------------------
-- BELOW ARE THE SELECT QUERIES ANSWERING A BUSINESS QUESTION
-- ALONG WITH THESE QUERIES, THERE WILL BE A 1 - 2 SENTENCE DESCRIBING THE QUERY
-- --------------------------------... |
<filename>database/sql/users.sql<gh_stars>0
use oudomsod;
create TABLE users (
id int AUTO_INCREMENT not null primary key,
first_name varchar(50) not null,
last_name varchar(50) not null,
avatar varchar(255),
email varchar(255) not null,
password varchar(128) not null,
resume_id int,
use... |
-- smallint count lots
SELECT vec_to_count(smallints) FROM measurements WHERE sensor_id IN (1, 2, 3, 4);
-- smallint count none
SELECT vec_to_count(smallints) FROM measurements WHERE sensor_id = -1;
-- smallint count one null
SELECT vec_to_count(smallints) FROM measurements WHERE sensor_id = 1;
-- smallint count array ... |
<reponame>natasha-mann/employee-tracker<gh_stars>0
USE workplace_db;
insert into employee (first_name, last_name, role_id)
values ("Danielle", "Simpson", 3);
insert into employee (first_name, last_name, role_id, manager_id)
values ("Alice", "Brown", 2, 1);
insert into employee (first_name, last_name, role_id, manager_... |
<reponame>patdaburu/nertz-data-model
-- DROP TABLE postaddr.counties;
CREATE TABLE postaddr.counties
(
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(),
state CHARACTER VARYING(8) NOT NULL
REFERENCES postaddr.states(code)
ON DELETE RESTRICT
ON UPDATE CASCADE ,
name CHARACTER VARYING(255) UNIQ... |
SET DEFINE OFF;
create or replace package afw_11_prodt_pkg
is
gva_base_url varchar2 (1000);
function obten_prodt_sesn
return number;
function obten_prodt (pva_code_prodt in varchar2)
return number;
function obten_code_prodt (pnu_seqnc in number default null)
return varchar2;
function obten_a... |
UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude, lastGPSTimestamp = UNIX_TIMESTAMP WHERE imeiNumber = SUBSTRING
UPDATE server SET registration = :registration, readonly = :readonly, map = :map, bingKey = :bingKey, mapUrl = :mapUrl, distanceUnit = :distanceUnit, speedUnit = :speedUnit, l... |
<reponame>youngppl/connect
-- AlterTable
ALTER TABLE "User" ADD COLUMN "extra" JSONB NOT NULL DEFAULT E'{}';
|
<filename>migrations/sqls/20201028204537-followups-up.sql
CREATE TABLE IF NOT EXISTS followUps (
id INT AUTO_INCREMENT PRIMARY KEY,
clientId INT NOT NULL,
title VARCHAR(255) NOT NULL,
description MEDIUMTEXT,
dateOfContact DATETIME NOT NULL,
appointmentDate DATETIME,
addedBy INT NOT NULL,
updatedBy INT N... |
/*
Name: Delete-InactiveSwitchSNMPInfo.sql
Author: <NAME>
Last modified: Feb 16 2017
Deletes MAC address information gathered via SNMP that relates to connections to inactive switch assets.
Used to clear old LLDP/CDP connection details from assests that were connected to switches that have been de... |
DROP TABLE IF EXISTS dec09;
CREATE TABLE dec09 (
program text NOT NULL
);
\COPY dec09 (program) FROM PROGRAM 'curl -b session.cookie https://adventofcode.com/2019/day/9/input';
VACUUM ANALYZE dec09;
/* FIRST STAR */
WITH RECURSIVE
machine (ip, relbase, inputs, outputs, state) AS (
SELECT 0,
CAST(... |
CREATE TABLE IF NOT EXISTS prompts (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
discriminant INTEGER NOT NULL,
message_id INTEGER NOT NULL,
payload INTEGER,
recipient_discord_id INTEGER NOT NULL UNIQUE,
FOREIGN KEY (recipient_discord_id) references users(... |
<reponame>taiak/web-proje2017
use PROJE;
# musteri tablosuna ekleme ornegi
INSERT INTO Customer VALUES(0, '<NAME>', 'İLERİ', '<EMAIL>');
INSERT INTO Customer VALUES(0, 'hidir2', 'surname_2', 'email_2');
INSERT INTO Customer VALUES(0, 'mehmet', 'surname_3', 'email_3');
INSERT INTO Customer VALUES(0, 'semra', 's... |
CREATE TEMPORARY VIEW t AS select '2011-05-06 07:08:09.1234567' as c, interval 10 year 20 month 30 day 40 hour 50 minute 6.7890 second as i;
select extract(millennium from c), extract(millennium from i) from t;
select extract(millennia from c), extract(millennia from i) from t;
select extract(mil from c), extract(mil ... |
<filename>src/pack/scripts/sql/sqlserver-create-observation_counts-view.ddl
CREATE VIEW [dbo].[observation_counts]
AS
with
observation_count_view
AS
(
SELECT
video_reference_uuid,
COUNT(video_reference_uuid) AS counts
FROM
... |
-- liquibase formatted sql
-- changeset AmyS:dml_v7890d
INSERT INTO purchase_order (id, customer_id, order_date) VALUES (1, 2, '2018-01-04');
INSERT INTO purchase_order (id, customer_id, order_date) VALUES (2, 1, '2018-02-13');
INSERT INTO purchase_order (id, customer_id, order_date) VALUES (3, 2, '2018-02-25');
|
<reponame>Constructor0987/MeisterGeister
--Datenkorrekturen bei den Sonderfertigkeiten
INSERT INTO [Sonderfertigkeit] ( [SonderfertigkeitGUID], [Name], [HatWert], [Typ], [Literatur], [Voraussetzungen])
VALUES ('00000000-0000-0000-005f-000000001536' ,N'Zauber vereinigen' ,0 ,N'Magisch' ,N'WdH 291 / WdZ 17' ,N... |
<gh_stars>10-100
--# Copyright IBM Corp. All Rights Reserved.
--# SPDX-License-Identifier: Apache-2.0
/*
* Shows how many rows per second are being returned, read, inserted etc for active applications
*/
CREATE OR REPLACE VIEW DB_APP_ROWS_PER_SEC AS
SELECT
APPLICATION_HANDLE AS HANDLE
, MIN(LOCAL_START_T... |
--INSERT INTO tbl_profile (type, type_fk, org_fk, prof_type_fk, user_fk) VALUES ('ENV', 1, 1, 2, 0);
--INSERT INTO tbl_profile (type, type_fk, org_fk, prof_type_fk, user_fk) VALUES ('ENV', 2, 2, 3, 0);
--INSERT INTO tbl_profile (type, type_fk, org_fk, prof_type_fk, user_fk) VALUES ('ENV', 3, 3, 4, 0);
--INSERT INTO ... |
<filename>install/init/esb-init/esb_component_system.sql
-- MySQL dump 10.14 Distrib 5.5.68-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: dev_paas
-- ------------------------------------------------------
-- Server version 5.5.68-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... |
<filename>docs/ModifyDB-5.sql<gh_stars>0
CREATE TABLE IF NOT EXISTS 'association' ( 'association_id' INTEGER PRIMARY KEY, 'association_reservation' INTEGER, 'association_target' TEXT, 'association_type' TEXT, 'association_begin' DATETIME, 'association_end' DATETIME, 'association_comment' TEXT );
|
<gh_stars>0
INSERT INTO TB_ENDERECO VALUES (1, 'RUA CEARÁ');
INSERT INTO TB_ENDERECO VALUES (2, 'RUA BAHIA');
INSERT INTO TB_ENDERECO VALUES (3, 'RUA MINAS GERAIS');
INSERT INTO TB_ENDERECO VALUES (4, 'RUA PIAUÍ');
INSERT INTO TB_ENDERECO VALUES (5, 'RUA ARAXA');
INSERT INTO TB_ENDERECO VALUES (6, 'RUA SÃO PAULO');
INS... |
-- Adminer 4.1.0 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `event`;
CREATE TABLE `event` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(50) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date... |
<reponame>eastnorthwest/webstore<gh_stars>0
DROP TABLE IF EXISTS return_items;
DROP TABLE IF EXISTS returns;
DROP TABLE IF EXISTS order_items;
DROP TABLE IF EXISTS orders;
DROP TABLE IF EXISTS cart_items;
DROP TABLE IF EXISTS cart;
DROP TABLE IF EXISTS images;
DROP TABLE IF EXISTS products;
DROP TABLE IF EXISTS session... |
<filename>db/init.sql
DROP DATABASE IF EXISTS rsvp;
CREATE DATABASE rsvp;
\c rsvp;
CREATE TABLE invites (
uuid UUID,
name VARCHAR,
email VARCHAR UNIQUE,
confirmed BOOLEAN,
invited BOOLEAN
);
|
<reponame>carehart/dba-dash
CREATE TABLE dbo.Instances (
InstanceID INT IDENTITY(1, 1) NOT NULL,
Instance sysname NOT NULL,
ConnectionID sysname NOT NULL,
IsActive BIT NULL,
BuildClrVersion NVARCHAR(128) NULL,
Collation NVARCHAR(128) NULL,
CollationID INT NULL,
ComparisonStyle INT NULL,... |
<gh_stars>0
{% macro money_to_words(column, lang='en') %}
{{ return(adapter.dispatch('money_to_words', 'dbt_resto')(column, lang)) }}
{% endmacro %}
{% macro default__money_to_words(column, lang='en') %}
{{var('num2words_schema', 'dbtresto')}}.MoneyToWords_{{lang|upper}}(floor({{column}}), {{column}} - floor({{col... |
<filename>student-backend/src/main/resources/flyway/V1.202001311618__CREATE_ACCOUNT.sql
create table t_account(
userId bigint primary key auto_increment,
username varchar(255) not null ,
password varchar(255) not null
)default charset utf8mb4; |
-- USER
-- non-encrypted password: <PASSWORD>
INSERT INTO security_user (id, username, password, first_name, last_name) VALUES
(1, 'admin', '$2a$12$ZhGS.zcWt1gnZ9xRNp7inOvo5hIT0ngN7N.pN939cShxKvaQYHnnu', 'Administrator', 'Adminstrator'),
(2, 'csr_jane', '$2a$12$ZhGS.zcWt1gnZ9xRNp7inOvo5hIT0ngN7N.pN939cShxKvaQYHnnu', ... |
--liquibase formatted sql
--changeset artemov_i:MTClassAllView dbms:postgresql runOnChange:true splitStatements:false stripComments:false
INSERT INTO s_mt.t_query (ck_id, cc_query, ck_provider, ck_user, ct_change, cr_type, cr_access, cn_action, cv_description) VALUES ('MTClassAllView', '/*MTClassAllView*/
select
ro... |
ALTER TABLE `pvlng_reading_num` PARTITION BY LINEAR KEY(`id`) PARTITIONS 50;
|
if exists (select * from INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'vw$tablename$_List')
Drop View dbo.vw$tablename$_List;
GO
Create View dbo.vw$tablename$_List
as
select *
from vw$tablename$
GO
Grant Select on dbo.vw$tablename$_List to public;
GO
|
-- file:float8.sql ln:8 expect:true
INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30 ')
|
<filename>aula2/script2.sql<gh_stars>10-100
/**
* Fundamentos do banco de dados MySQL - Aula 2
* Projeto: Agenda de Contatos
* @author Professor <NAME>
*/
create database dbagenda;
use dbagenda;
-- o comando abaixo exibe as tabelas do banco de dados
show tables;
/*
O bloco de códigos abaixo cria uma tabela
i... |
-- db_setup_up.sql
\set ON_ERROR_STOP on
-- drop the database
set role postgres;
\c postgres
drop database if exists "restoration-tracker";
drop role if exists restoration_api;
create database "restoration-tracker";
\c "restoration-tracker"
set client_min_messages=warning;
-- TODO: lock down public but a... |
<filename>src/main/resources/liquibase/sql/major_db.sql<gh_stars>0
-- liquibase formatted sql
-- changeset chenxt:1
CREATE TABLE IF NOT EXISTS `user`
(
`id` bigint(20) NOT NULL COMMENT '编号 - 雪花',
`phone` varchar(30) NOT NULL DEFAULT '' COMMENT '手机号码',
`email` varchar(50... |
<reponame>shaobo322/harbor<filename>make/migrations/postgresql/0050_2.2.0_schema.up.sql
/*
Fixes issue https://github.com/goharbor/harbor/issues/13317
Ensure the role_id of maintainer is 4 and the role_id of limisted guest is 5
*/
UPDATE role SET role_id=4 WHERE name='maintainer' AND role_id!=4;
UPDATE role SET rol... |
-- add isHidden column to mucService, with isHidden set to false by default
ALTER TABLE mucService ADD COLUMN isHidden INTEGER DEFAULT 0 NOT NULL;
UPDATE jiveVersion set version=18 where name = 'openfire'; |
<reponame>Cecilya/activejdbc
DROP FUNCTION IF EXISTS simpleFunction |
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.7 (Debian 11.7-1.pgdg90+1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-1.pgdg90+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_stri... |
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "Book" (
"isbn" TEXT NOT NULL,
"book_title" TEXT NOT NULL,
"year_of_publication" NUMERIC,
"average_book_rating" INTEGER,
"book_author_id" TEXT,
"book_genre_id" TEXT,
"book_user_id" TEXT,
"borrower_book_id" TEXT,
"owned_book_id" TEXT,
PRIMARY KEY("isbn"),
FOREIGN ... |
<reponame>rechandler/contractGenerator
-- CreateTable
CREATE TABLE "Category" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT NOT NULL,
"dealershipId" INTEGER NOT NULL,
PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "Category" ADD FOREIGN KEY ("dealershipId") REFERENCES "Deale... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1ubuntu0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 27, 2018 at 11:09 PM
-- Server version: 5.5.62-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
# 18. Find First 10 Started Projects
#
# Write a SQL query to find first 10 started projects. Select all information
# about them and sort them by start date, then by name. Sort the information by id.
USE soft_uni;
SELECT *
FROM projects p
ORDER BY
p.start_date,
p.name
LIMIT 10; |
create table tabela1(
campo1 text,
campo2 integer
);
drop TABLE tabela1;
CREATE TABLE produto(
nproduto integer,
descricao text,
preco numeric DEFAULT 9.99
);
create table produto9
|
-- dummy data for storing items in more than one location
INSERT INTO TagItems VALUES
(2, 9, 6),
(8, 9, 9),
(10, 9, 36);
-- Creates a view to find all the items which are stored in more than one location
CREATE OR REPLACE VIEW view_item_locations AS
SELECT Items.*, TagItems.tag, TagItems.qty_left
FR... |
<reponame>honchardev/KPI
INSERT INTO markets (name) VALUES ('auchan');
INSERT INTO markets (name) VALUES ('fora');
INSERT INTO markets (name) VALUES ('silpo');
|
INSERT INTO tournaments_signed_users VALUES (3, 700); |
--@Autor: <NAME> y <NAME>
--@Fecha creación: 18/06/2020
--@Descripción: Prueba para la función que calcula puntos de prueba
set serveroutput on
Prompt =======================================
Prompt Prueba para la función que calcula el total de puntos
Prompt ========================================
declare
v_propi... |
<filename>MSSQL-Code/Scripts/Post-Deployment/SalaryExamples.sql
--Examples for the salary table
IF NOT EXISTS (SELECT 'Exists' FROM [Internal].Salary)
BEGIN
INSERT INTO [Internal].Salary (AppUserId, SalaryStartDate, SalaryEndDate, SalaryAmount )
SELECT AppUserId, SalaryStartDate = GETDATE(), NULL
, SalaryAmount =... |
DROP TABLE IF EXISTS gt_pk_metadata;
CREATE TABLE public.gt_pk_metadata (
table_schema VARCHAR(32) NOT NULL,
table_name VARCHAR(32) NOT NULL,
pk_column VARCHAR(32) NOT NULL,
pk_column_idx INTEGER,
pk_policy VARCHAR(32),
pk_sequence VARCHAR(64),
unique (table_schema, table_name, pk_column),
check (pk_po... |
<reponame>Foxpips/LayeredArchitecture
-- ================================================
-- Author: <NAME>
-- Create date: 08/05/09
-- Description: Returns the product name and
-- peopleSoftIds off all products
-- for the current catalogue version
-- ================================================
CRE... |
--------------------------------------------------------
-- DDL for Index I_FK_PORTER_PARTICIPANT
--------------------------------------------------------
CREATE INDEX "G11_FLIGHT"."I_FK_PORTER_PARTICIPANT" ON "G11_FLIGHT"."PORTER" ("PART_NUM")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INI... |
<reponame>Shuttl-Tech/antlr_psql
-- file:tablesample.sql ln:89 expect:true
SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (NULL)
|
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Generation Time: Aug 18, 2020 at 10:41 PM
-- Server version: 5.6.49
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
/* Formatted on 12-17-2018 4:43:23 PM (QP5 v5.126.903.23003) */
DROP TABLE SELF.SELF_PRSN_NATIONAL_IDS CASCADE CONSTRAINTS PURGE;
CREATE TABLE SELF.SELF_PRSN_NATIONAL_IDS (
PERSON_ID NUMBER NOT NULL,
NATIONALITY VARCHAR2 (100),
ID_NUMBER VARCHAR2 (100),
CREATED_BY NUMBER NO... |
<reponame>sudhakar52621/cm<filename>modules/configuration/config/templates/database/Statspack/zeroRowQueriesByExecution.sql
SELECT * FROM
(SELECT old_hash_value, CASE SUM(executions) WHEN 0 THEN 0 ELSE SUM(${columnToSum})/SUM(executions) END AS "${sumColumnName}/Execution"
FROM
(
SELECT old_hash_value, -${columnToS... |
<reponame>rimsha-aziz/sql-challenge
-- PART 1: DATA ENGINEERING
--Drop any existing tables
DROP TABLE Employees;
DROP TABLE Departments;
DROP TABLE Department_employees;
DROP TABLE Department_manager;
DROP TABLE Salaries;
DROP TABLE Titles;
-- Create tables
CREATE TABLE Employees (
emp_no INT PRIMARY KEY NOT N... |
SELECT PS.PS_PARTKEY, COUNT(*)
FROM lineitem L,
partsupp PS
WHERE L.L_PARTKEY = PS.PS_PARTKEY
GROUP BY PS.PS_PARTKEY
ORDER BY PS.PS_PARTKEY
LIMIT 100;
|
metadata :name => "httpd",
:description => "Agent to manage the httpd",
:author => "<NAME>",
:license => "Apache License 2.0",
:version => "0.1",
:url => "https://",
:timeout => 10
action "graceful", :description => "graceful restart" do
d... |
-- Database: derby
-- Change Parameter: path=my/path/file.sql
|
-- ----------------------------
-- 日期:2018-12-09 22:54:52
-- MySQL - 5.5.53-MariaDB : Database - flyfly
-- ----------------------------
CREATE DATAbase IF NOT EXISTS `flyfly` DEFAULT CHARACTER SET utf8 ;
USE `flyfly`;
-- ----------------------------
-- Table structure for `f_admin`
-- ----------------------------
D... |
-- 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.
-- SPDX-License-Identifier: Apache-2.0
-- Licens... |
--
-- K2PG_FEATURE Testsuite: UPDATE
-- An introduction on whether or not a feature is supported in YugaByte.
-- This test suite does not go in depth for each command.
--
-- Prepare two identical tables of all supported primitive types.
--
-- INSERT values to be updated
--
INSERT INTO feature_tab_dml VALUES(
77... |
-- @testpoint:opengauss关键字definer(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists definer;
create group definer with password '<PASSWORD>';
drop group definer;
--关键字带双引号-成功
drop group if exists "definer";
create group "definer" with password '<PASSWORD>';
drop group "definer";
--关键字带单引号-合理报错
drop group if exists 'de... |
INSERT INTO task(task_name, task_date, task_priority) VALUES('Napraviti zadacu', '2020-12-12', 'LOW');
INSERT INTO task(task_name, task_priority) VALUES('Prosetati psa', 'LOW');
INSERT INTO task(task_name, task_priority) VALUES('Usisati kucu', 'HIGH');
INSERT INTO task(task_name, task_date, task_priority) VALUES('Napra... |
CREATE DATABASE IF NOT EXISTS university;
CREATE TABLE electives (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(128),
description VARCHAR(1024),
lecturer VARCHAR(128)
);
INSERT INTO electives (title, description, lecturer)
VALUES
("Programming with Go", "Let's learn Go", "<NAME>"),
("AKDU"... |
<filename>db/seeds.sql
INSERT INTO department (name)
VALUES
('Corporate'),
('IT'),
('Inside Sales'),
('Legal'),
('HR'),
('Warehouse');
INSERT INTO roles (title, salary, department_id)
VALUES
('AVP' , 300.5 , 1 ),
('Manager' , 90.2 , 2 ),
('Sales Rep', 75.5 , 3),
('Legal Strategist' , 67.1 , 4),
('Team Lead' , 60.7 ... |
<filename>database/init/cities/city.list158.sql
insert into city values
(3011467,"Keskastel","FR",7.04412,48.971321),
(3011506,"Kervignac","FR",-3.23778,47.76289),
(3011539,"Kertzfeld","FR",7.57082,48.379341),
(3011563,"Kersaint-Plabennec","FR",-4.37233,48.471661),
(3011624,"Kernilis","FR",-4.418,48.570751),
(3011686,"... |
# Write your MySQL query statement below
SELECT
U.NAME, COALESCE(SUM(DISTANCE), 0)as travelled_distance
FROM
USERS U
LEFT JOIN
RIDES R
ON
U.ID = R.USER_ID
GROUP BY 1
ORDER BY 2 DESC, 1 ASC
|
CREATE TABLE traco_unico (
id_traco_unico INTEGER NOT NULL,
nome VARCHAR(50) NOT NULL,
classificacao VARCHAR(50),
CONSTRAINT id_traco_unico PRIMARY KEY (id_traco_unico)
);
CREATE TABLE elemento (
id_elemento INTEGER NOT NULL,
... |
<filename>sql/testData.sql<gh_stars>0
use employee_tracker_db;
insert into departments(name) values ("IT"), ("Sales"), ("Devlopment");
insert into roles(title, salary, department_id) values ("IT Manager", 72000, 1), ("IT Clerk", 56000, 1), ("Sales Manager", 64000, 2), ("Sales Associate", 44000, 2), ("Development Mana... |
--
-- Table Comments
--
DROP TABLE IF EXISTS Comments;
CREATE TABLE Comments (
"id" INTEGER PRIMARY KEY NOT NULL,
"UserId" INTEGER,
"UserName" TEXT,
"UserEmail" TEXT,
"comment" TEXT,
"created" TIMESTAMP,
"updated" DATETIME,
"deleted" DATETIME
);
|
<gh_stars>0
-- Creates a login for Azure SQL Database in the master database
DECLARE @Username NVARCHAR(30) = 'app'
IF NOT EXISTS (SELECT [name] FROM [master].[sys].[server_principals] WHERE [name] = @Username)
BEGIN
-- Create a random password
DECLARE @Password NVARCHAR(100) = '';
WHILE LEN(@Password) < ... |
<reponame>wandersonDeve/ranqueamento-automatico-de-questoes
/*
Warnings:
- You are about to drop the column `respotas_certas` on the `pergunta` table. All the data in the column will be lost.
- You are about to drop the column `respotas_erradas` on the `pergunta` table. All the data in the column will be lost.
... |
-- auto growth settings for data and log files
select DB_NAME(mf.database_id) database_name
, mf.name logical_name
, CONVERT (DECIMAL (20,2) , (CONVERT(DECIMAL, size)/128)) [file_size_MB]
, CASE mf.is_percent_growth
WHEN 1 THEN 'Yes'
ELSE 'No'
END AS [is_percent_growth]
, CASE mf.is_percent_growth
... |
create or replace package aoc_day11_seating_system as
type t_cols is varray(100) of char(1);
type t_rows is varray(100) of t_cols;
function part_1_occupied_seats(
i_input sys.odcivarchar2list,
i_print_steps boolean default false ) return integer;
function part_2_occupied_seats(
i_input sys.odciva... |
INSERT INTO WA_contenu_demande (gamme_produit, volume_mois, essence, profil, etat_surface, conditionnement_botte, conditionnement_palette, unite_facture, produit_spec_client, etiquette_botte, etiquette_gencod, normes_environnementales, marquage_ce)
VALUES
('lambris', 150, 'essence', 'profil', 'etat_surface', 'conditi... |
alter table "public"."ward" drop constraint "ward_gender_fkey";
|
SELECT SUM(population)
FROM CITY
WHERE district = 'California'
|
-- 新建开源用的数据库
CREATE DATABASE `binchuan_data` CHARACTER SET utf8;
USE `binchuan_data`;
---- 填充2个县的数据
-- 贫困户数据
CREATE TABLE binchuan_data.yunnan_all_pinkunhu_2014
AS
SELECT * FROM data_fupin.yunnan_all_pinkunhu_2014 where county='宾川县';
CREATE TABLE binchuan_data.yunnan_all_pinkunhu_2015
AS
SELECT * FROM data_fupin.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.